View Javadoc

1   /*
2    * $Id$
3    * 
4    * Created on 26 Jan 2010 by Paul Harrison (paul.harrison@manchester.ac.uk)
5    *
6    * Adapted from official SOFA C implementation http://www.iausofa.org/
7    */ 
8   
9   package org.jastronomy.jsofa;
10  
11  import static java.lang.StrictMath.*; 
12  
13  /**
14   * Java implementation of Standards of Fundamental Astronomy. <a href="http://www.iausofa.org/">http://www.iausofa.org/</a>
15   * 
16   * This code has been created by hand translating the official C version.
17   * 
18   * @author Paul Harrison (paul.harrison@manchester.ac.uk) 02 Apr 2014
19   * @version JSOFA Release 2016-07-29_a
20   * @since 26 Jan 2010
21   */
22  public class JSOFA {
23      /** tracked IAU SOFA release {@value}. */
24      public final static String SOFA_RELEASE = "2016-07-29";
25  
26      /** tracked IAU SOFA revision {@value}. */
27      public final static String SOFA_REVISION = "12";
28  
29      
30  
31      /** Seconds of time to radians {@value} */
32      public final static double DS2R = (7.272205216643039903848712e-5);
33  
34      /** Pi {@value}*/
35      public final static double DPI = (3.141592653589793238462643);
36  
37      /** 2Pi {@value}*/
38      public final static double D2PI = (6.283185307179586476925287);
39  
40      /** Radians to degrees {@value} */
41      public final static double DR2D = (57.29577951308232087679815);
42  
43      /** Degrees to radians {@value}*/
44      public final static double DD2R = (1.745329251994329576923691e-2);
45  
46      /** Radians to arcseconds {@value}*/
47      public final static double DR2AS = (206264.8062470963551564734);
48  
49      /** Arcseconds to radians {@value}*/
50      public final static double DAS2R = (4.848136811095359935899141e-6);
51  
52      /** Arcseconds in a full circle {@value}*/
53      public final static double TURNAS = (1296000.0);
54  
55      /** Milliarcseconds to radians {@value}*/
56      public final static double DMAS2R = (DAS2R / 1e3);
57  
58      /** Length of tropical year B1900 (days) {@value}*/
59      public final static double DTY = (365.242198781);
60  
61      /** Reference epoch (J2000.0), Julian Date {@value}*/
62      public final static double DJ00 = (2451545.0);
63  
64      /** Julian Date of Modified Julian Date zero {@value}*/
65      public final static double DJM0 = (2400000.5);
66  
67      /** Reference epoch (J2000.0), Modified Julian Date {@value} */
68      public final static double DJM00 = (51544.5);
69  
70      /** Seconds per day. {@value}*/
71      public final static double DAYSEC = (86400.0);
72  
73      /** Days per Julian year */
74      public final static double DJY = (365.25);
75  
76      /** Days per Julian century {@value} */
77      public final static double DJC = (36525.0);
78  
79      /** Days per Julian millennium {@value} */
80      public final static double DJM = (365250.0);
81      
82      /** 1977 Jan 1.0 as MJD */
83      public final static double DJM77 = (43144.0);
84  
85      /** TT minus TAI (s) */
86      public final static double TTMTAI = (32.184);
87  
88  
89      /**  Astronomical unit (m) {@value} */
90      public final static double DAU = (149597870e3);
91      
92      /** Speed of light (m/s) */
93      public final static double CMPS = 299792458.0;
94  
95      /** Light time for 1 au (s) */
96      public final static double AULT = 499.004782;
97  
98  
99      /** Speed of light (AU per day) {@value} */
100     public final static double DC = (DAYSEC / AULT);
101     
102     /** L_G = 1 - d(TT)/d(TCG) */
103     public final static double ELG = (6.969290134e-10);
104 
105     /** L_B = 1 - d(TDB)/d(TCB) at TAI 1977/1/1.0 */
106     public final static double ELB = (1.550519768e-8);
107     
108     /** Schwarzschild radius of the Sun (au) {@value}
109      = 2 * 1.32712440041e20 / (2.99792458e8)^2 / 1.49597870700e11 */
110     public final static double SRS = 1.97412574336e-8;
111 
112     
113     /** TDB (s) at TAI 1977/1/1.0 */
114     public final static double TDB0 = (-6.55e-5);
115 
116 
117     /** dint(A) - truncate to nearest whole number towards zero (double)  */
118     private static double dint(final double A){ return ((A)<0.0?ceil(A):floor(A));}
119 
120     /** dnint(A) - round to nearest whole number (double)  */
121     private static double dnint(final double A){return ((A)<0.0?ceil((A)-0.5):floor((A)+0.5));}
122 
123     /** dsign(A,B) - magnitude of A with sign of B (double) */
124     private static double dsign(final double A, double B){return ((B)<0.0?-abs(A):abs(A));}
125 
126 
127     
128     /**
129      * Julian Date representation. The actual date is djm0+djm1, apportioned in any
130      *     convenient way between the two arguments.  For example,
131      *     JD(TT)=2450123.7 could be expressed in any of these ways,
132      *     among others:
133      *<pre>
134      *            djm0          djm1
135      *
136      *         2450123.7           0.0       (JD method)
137      *         2451545.0       -1421.3       (J2000 method)
138      *         2400000.5       50123.2       (MJD method)
139      *         2450123.5           0.2       (date &amp;time method)
140      *</pre>
141      * 
142      * The JD method is the most natural and convenient to use in
143      *     cases where the loss of several decimal digits of resolution
144      *     is acceptable.  The J2000 method is best matched to the way
145      *     the argument is handled internally and will deliver the
146      *     optimum resolution.  The MJD method and the date &amp;time methods
147      *     are both good compromises between resolution and convenience.
148      * 
149      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 28 Jan 2010
150      * 
151      * 
152      */
153     public static class JulianDate {
154         /**  MJD zero-point */
155         public double djm0;  
156         /** MJD offset */
157         public double djm1;
158         public JulianDate(double d1, double d2) {
159             djm0 = d1;
160             djm1 = d2;
161         }
162     }
163  
164     /**
165     * Decompose radians into degrees, arcminutes, arcseconds, fraction.
166     *  
167     *
168     *  <p>This function is derived from the International Astronomical Union's
169     *  SOFA (Standards Of Fundamental Astronomy) software collection.
170     *
171     *  <p>Status:  vector/matrix support function.
172     *  
173     *
174     *
175     *<p>Called:<ul>
176     *     <li>{@link #jauD2tf}      decompose days to hms
177     *</ul>
178     * <p>Notes:
179     *<ol>
180     *  <li> The argument ndp is interpreted as follows:
181     *
182     * <pre>
183     *     ndp         resolution
184     *      :      ...0000 00 00
185     *     -7         1000 00 00
186     *     -6          100 00 00
187     *     -5           10 00 00
188     *     -4            1 00 00
189     *     -3            0 10 00
190     *     -2            0 01 00
191     *     -1            0 00 10
192     *      0            0 00 01
193     *      1            0 00 00.1
194     *      2            0 00 00.01
195     *      3            0 00 00.001
196     *      :            0 00 00.000...
197     *</pre>
198     *  <li> The largest positive useful value for ndp is determined by the
199     *     size of angle, the format of doubles on the target platform, and
200     *     the risk of overflowing idmsf[3].  On a typical platform, for
201     *     angle up to 2pi, the available floating-point precision might
202     *     correspond to ndp=12.  However, the practical limit is typically
203     *     ndp=9, set by the capacity of a 32-bit int, or ndp=4 if int is
204     *     only 16 bits.
205     *
206     *  <li> The absolute value of angle may exceed 2pi.  In cases where it
207     *     does not, it is up to the caller to test for and handle the
208     *     case where angle is very nearly 2pi and rounds up to 360 degrees,
209     *     by testing for idmsf[0]=360 and setting idmsf[0-3] to zero.
210     *</ol>
211     *@version 2008 May 27
212     *
213     *  @since Release 20101201
214     *
215     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
216     * <!-- Given: -->
217     *    @param ndp     int     resolution (Note 1)
218     *    @param angle   double  angle in radians
219     *    @param idmsf   int[4] <u>returned</u> degrees, arcminutes, arcseconds, fraction
220     * <!-- Returned: -->
221     *    @return sign    char    '+' or '-'
222     */
223     public static char jauA2af(final int ndp, final double angle,  int idmsf[] ){
224         /* Hours to degrees * radians to turns */
225         final double F = 15.0 / D2PI;
226 
227 
228      /* Scale then use days to h,m,s function. */
229         char retval = jauD2tf(ndp, angle*F, idmsf);
230 
231         return retval;
232 
233         
234     }
235     
236 
237     
238     /**
239     *  Decompose radians into hours, minutes, seconds, fraction.
240     *
241     *<p>This function is derived from the International Astronomical Union's
242     *  SOFA (Standards Of Fundamental Astronomy) software collection.
243     *
244     *<p>Status:  vector/matrix support function.
245     *
246     *<!-- Given: -->
247     *     @param ndp      int      resolution (Note 1)
248     *     @param angle    double   angle in radians
249     *
250     *<!-- Returned: -->
251     *     @param ihmsf    int[4]    <u>returned</u> hours, minutes, seconds, fraction
252     *     @return sign     char      <u>returned</u> '+' or '-'
253     *
254     *<p>Called:<ul>
255     *     <li>{@link #jauD2tf} decompose days to hms
256     * </ul>
257     * <p>Notes:
258     * <ol>
259     *
260     * <li> The argument ndp is interpreted as follows:
261     * <pre>
262     *     ndp         resolution
263     *      :      ...0000 00 00
264     *     -7         1000 00 00
265     *     -6          100 00 00
266     *     -5           10 00 00
267     *     -4            1 00 00
268     *     -3            0 10 00
269     *     -2            0 01 00
270     *     -1            0 00 10
271     *      0            0 00 01
272     *      1            0 00 00.1
273     *      2            0 00 00.01
274     *      3            0 00 00.001
275     *      :            0 00 00.000...
276     *</pre>
277     * <li> The largest positive useful value for ndp is determined by the
278     *     size of angle, the format of doubles on the target platform, and
279     *     the risk of overflowing ihmsf[3].  On a typical platform, for
280     *     angle up to 2pi, the available floating-point precision might
281     *     correspond to ndp=12.  However, the practical limit is typically
282     *     ndp=9, set by the capacity of a 32-bit int, or ndp=4 if int is
283     *     only 16 bits.
284     *
285     * <li> The absolute value of angle may exceed 2pi.  In cases where it
286     *     does not, it is up to the caller to test for and handle the
287     *     case where angle is very nearly 2pi and rounds up to 24 hours,
288     *     by testing for ihmsf[0]=24 and setting ihmsf(0-3) to zero.
289     *</ol>
290     *  @version 2008 May 11
291     *
292     *  @since Release 20101201
293     *
294     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
295     */
296     public static char jauA2tf(final int ndp, final double angle, int ihmsf[])
297     {
298     /* Scale then use days to h,m,s function. */
299      return  jauD2tf(ndp, angle/D2PI, ihmsf);
300 
301      }
302     
303 
304     /**
305     *  Normalize angle into the range {@literal 0 <= a < 2pi}.
306     *
307     *<p>This function is derived from the International Astronomical Union's
308     *  SOFA (Standards Of Fundamental Astronomy) software collection.
309     *
310     *<p>Status:  vector/matrix support function.
311     *
312     *<!-- Given: -->
313     *     @param a         double      angle (radians)
314     *
315     * <!-- Returned (function value): -->
316     *  @return double     angle in range 0-2pi
317     *
318     *@version 2008 May 16
319     *
320     *  @since Release 20101201
321     *
322     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
323     */
324     public static double jauAnp(final double a)
325    {
326        double w;
327 
328 
329        w = fmod(a, D2PI);
330        if (w < 0) w += D2PI;
331 
332        return w;
333 
334     }
335     
336 
337     /**
338     *  Normalize angle into the range  {@literal -pi <= a < +pi}.
339     *
340     *<p>This function is derived from the International Astronomical Union's
341     *  SOFA (Standards Of Fundamental Astronomy) software collection.
342     *
343     *<p>Status:  vector/matrix support function.
344     *
345     *<!-- Given: -->
346     *     @param a         double      angle (radians)
347     *
348     * <!-- Returned (function value): -->
349     *  @return double     angle in range +/-pi
350     *
351     *@version 2008 May 16
352     *
353     *  @since Release 20101201
354     *
355     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
356     */
357     public static double jauAnpm(final double a)
358     {
359        double w;
360 
361 
362        w = fmod(a, D2PI);
363        if (abs(w) >= DPI) w -= dsign(D2PI, a);
364 
365        return w;
366 
367         }
368     /**
369      * Frame bias components of IAU 2000 precession-nutation models.
370      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 2 Feb 2010
371      * 
372      * @since AIDA Stage 1
373      */
374     public static class FrameBias {
375         /** longitude  corrections */
376         public double dpsibi;
377         /**obliquity corrections */
378         public double depsbi;
379         /** the ICRS RA of the J2000.0 mean equinox */
380         public double dra;
381     };
382 
383     /**
384     *  Frame bias components of IAU 2000 precession-nutation models (part
385     *  of MHB2000 with additions).
386     *
387     *<p>This function is derived from the International Astronomical Union's
388     *  SOFA (Standards Of Fundamental Astronomy) software collection.
389     *
390     *<p>Status:  canonical model.
391     *
392     *<!-- Returned: -->
393     *     @return dpsibi,depsbi   double    <u>returned</u> longitude and obliquity corrections
394     *             dra             double    <u>returned</u> the ICRS RA of the J2000.0 mean equinox
395     *
396     * <p>Notes:
397     * <ol>
398     *
399     * <li> The frame bias corrections in longitude and obliquity (radians)
400     *     are required in order to correct for the offset between the GCRS
401     *     pole and the mean J2000.0 pole.  They define, with respect to the
402     *     GCRS frame, a J2000.0 mean pole that is consistent with the rest
403     *     of the IAU 2000A precession-nutation model.
404     *
405     * <li> In addition to the displacement of the pole, the complete
406     *     description of the frame bias requires also an offset in right
407     *     ascension.  This is not part of the IAU 2000A model, and is from
408     *     Chapront et al. (2002).  It is returned in radians.
409     *
410     * <li> This is a supplemented implementation of one aspect of the IAU
411     *     2000A nutation model, formally adopted by the IAU General
412     *     Assembly in 2000, namely MHB2000 (Mathews et al. 2002).
413     *</ol>
414     *<p>References:
415     *
416     *     Chapront, J., Chapront-Touze, M. &amp;Francou, G., Astron.
417     *     Astrophys., 387, 700, 2002.
418     *
419     *     <p>Mathews, P.M., Herring, T.A., Buffet, B.A., "Modeling of nutation
420     *     and precession   New nutation series for nonrigid Earth and
421     *     insights into the Earth's interior", J.Geophys.Res., 107, B4,
422     *     2002.  The MHB2000 code itself was obtained on 9th September 2002
423     *     from ftp://maia.usno.navy.mil/conv2000/chapter5/IAU2000A.
424     *
425     *@version 2009 December 17
426     *
427     *  @since Release 20101201
428     *
429     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
430     */
431     public static FrameBias jauBi00()
432    {
433     /* The frame bias corrections in longitude and obliquity */
434        final double DPBIAS = -0.041775  * DAS2R,
435                     DEBIAS = -0.0068192 * DAS2R;
436 
437     /* The ICRS RA of the J2000.0 equinox (Chapront et al., 2002) */
438        final double DRA0 = -0.0146 * DAS2R;
439 
440 
441     /* Return the results (which are fixed). */
442        FrameBias retval = new FrameBias();
443        retval.dpsibi = DPBIAS;
444        retval.depsbi = DEBIAS;
445        retval.dra = DRA0;
446 
447        return retval;
448 
449         }
450     
451 
452     /**
453     *  Frame bias and precession, IAU 2000.
454     *
455     *<p>This function is derived from the International Astronomical Union's
456     *  SOFA (Standards Of Fundamental Astronomy) software collection.
457     *
458     *<p>Status:  canonical model.
459     *
460     *<!-- Given: -->
461     *     @param date1
462     *      @param date2   double          TT as a 2-part Julian Date (Note 1)
463     *
464     *<!-- Returned: -->
465     *     @param rb            double[3][3]     <u>returned</u> frame bias matrix (Note 2)
466     *     @param rp            double[3][3]     <u>returned</u> precession matrix (Note 3)
467     *     @param rbp           double[3][3]     <u>returned</u> bias-precession matrix (Note 4)
468     *
469     * <p>Notes:
470     * <ol>
471     *
472     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
473     *     convenient way between the two arguments.  For example,
474     *     JD(TT)=2450123.7 could be expressed in any of these ways,
475     *     among others:
476     *<pre>
477     *             date1         date2
478     *
479     *         2450123.7           0.0       (JD method)
480     *         2451545.0       -1421.3       (J2000 method)
481     *         2400000.5       50123.2       (MJD method)
482     *         2450123.5           0.2       (date &amp;time method)
483     *</pre>
484     *     The JD method is the most natural and convenient to use in
485     *     cases where the loss of several decimal digits of resolution
486     *     is acceptable.  The J2000 method is best matched to the way
487     *     the argument is handled internally and will deliver the
488     *     optimum resolution.  The MJD method and the date &amp;time methods
489     *     are both good compromises between resolution and convenience.
490     *
491     * <li> The matrix rb transforms vectors from GCRS to mean J2000.0 by
492     *     applying frame bias.
493     *
494     * <li> The matrix rp transforms vectors from J2000.0 mean equator and
495     *     equinox to mean equator and equinox of date by applying
496     *     precession.
497     *
498     * <li> The matrix rbp transforms vectors from GCRS to mean equator and
499     *     equinox of date by applying frame bias then precession.  It is
500     *     the product rp x rb.
501     *
502     * <li> It is permissible to re-use the same array in the returned
503     *     arguments.  The arrays are filled in the order given.
504     *</ol>
505     *<p>Called:<ul>
506     *     <li>{@link #jauBi00} frame bias components, IAU 2000
507     *     <li>{@link #jauPr00} IAU 2000 precession adjustments
508     *     <li>{@link #jauIr} initialize r-matrix to identity
509     *     <li>{@link #jauRx} rotate around X-axis
510     *     <li>{@link #jauRy} rotate around Y-axis
511     *     <li>{@link #jauRz} rotate around Z-axis
512     *     <li>{@link #jauCr} copy r-matrix
513     *     <li>{@link #jauRxr} product of two r-matrices
514     * </ul>
515     *<p>Reference:
516     *     "Expressions for the Celestial Intermediate Pole and Celestial
517     *     Ephemeris Origin consistent with the IAU 2000A precession-
518     *     nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
519     *
520     *     n.b. The celestial ephemeris origin (CEO) was renamed "celestial
521     *          intermediate origin" (CIO) by IAU 2006 Resolution 2.
522     *
523     *@version 2010 January 18
524     *
525     *  @since Release 20101201
526     *
527     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
528     */
529     public static void jauBp00(final double  date1, final double date2,
530             double rb[][], double rp[][], double rbp[][])
531     {
532     /* J2000.0 obliquity (Lieske et al. 1977) */
533        final double EPS0 = 84381.448 * DAS2R;
534 
535        double t, dpsibi, depsbi;
536        double dra0, psia77, oma77, chia, dpsipr, depspr, psia, oma,
537               rbw[][] = new double[3][3];
538 
539 
540     /* Interval between fundamental epoch J2000.0 and current date (JC). */
541        t = ((date1 - DJ00) + date2) / DJC;
542 
543     /* Frame bias. */
544        FrameBias fb = jauBi00();
545        dpsibi = fb.dpsibi;
546        depsbi = fb.depsbi;
547        dra0 = fb.dra;
548     /* Precession angles (Lieske et al. 1977) */
549        psia77 = (5038.7784 + (-1.07259 + (-0.001147) * t) * t) * t * DAS2R;
550        oma77  =       EPS0 + ((0.05127 + (-0.007726) * t) * t) * t * DAS2R;
551        chia   = (  10.5526 + (-2.38064 + (-0.001125) * t) * t) * t * DAS2R;
552 
553     /* Apply IAU 2000 precession corrections. */
554        PrecessionDeltaTerms pc = jauPr00(date1, date2);
555        dpsipr = pc.dpsipr;  depspr = pc.depspr;
556        psia = psia77 + dpsipr;
557        oma  = oma77  + depspr;
558 
559     /* Frame bias matrix: GCRS to J2000.0. */
560        jauIr(rbw);
561        jauRz(dra0, rbw);
562        jauRy(dpsibi * sin(EPS0), rbw);
563        jauRx(-depsbi, rbw);
564        jauCr(rbw, rb);
565 
566     /* Precession matrix: J2000.0 to mean of date. */
567        jauIr(rp);
568        jauRx(EPS0,  rp);
569        jauRz(-psia, rp);
570        jauRx(-oma,  rp);
571        jauRz(chia,  rp);
572 
573     /* Bias-precession matrix: GCRS to mean of date. */
574        double[][] rt = jauRxr(rp, rbw );
575        jauCr(rt, rbp);
576        return;
577 
578         }
579     
580 
581     /**
582     *  Frame bias and precession, IAU 2006.
583     *
584     *<p>This function is derived from the International Astronomical Union's
585     *  SOFA (Standards Of Fundamental Astronomy) software collection.
586     *
587     *<p>Status:  support function.
588     *
589     *<!-- Given: -->
590     *     @param date1 double TT as a 2-part Julian Date (Note 1)
591     *     @param date2 double TT as a 2-part Julian Date (Note 1)
592     *
593     *<!-- Returned: -->
594     *     @param rb            double[3][3]     <u>returned</u> frame bias matrix (Note 2)
595     *     @param rp            double[3][3]     <u>returned</u> precession matrix (Note 3)
596     *     @param rbp           double[3][3]     <u>returned</u> bias-precession matrix (Note 4)
597     *
598     * <p>Notes:
599     * <ol>
600     *
601     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
602     *     convenient way between the two arguments.  For example,
603     *     JD(TT)=2450123.7 could be expressed in any of these ways,
604     *     among others:
605     *<pre>
606     *             date1         date2
607     *
608     *         2450123.7           0.0       (JD method)
609     *         2451545.0       -1421.3       (J2000 method)
610     *         2400000.5       50123.2       (MJD method)
611     *         2450123.5           0.2       (date &amp;time method)
612     *</pre>
613     *     The JD method is the most natural and convenient to use in
614     *     cases where the loss of several decimal digits of resolution
615     *     is acceptable.  The J2000 method is best matched to the way
616     *     the argument is handled internally and will deliver the
617     *     optimum resolution.  The MJD method and the date &amp;time methods
618     *     are both good compromises between resolution and convenience.
619     *
620     * <li> The matrix rb transforms vectors from GCRS to mean J2000.0 by
621     *     applying frame bias.
622     *
623     * <li> The matrix rp transforms vectors from mean J2000.0 to mean of
624     *     date by applying precession.
625     *
626     * <li> The matrix rbp transforms vectors from GCRS to mean of date by
627     *     applying frame bias then precession.  It is the product rp x rb.
628     * 
629     *  <li> It is permissible to re-use the same array in the returned
630     *        arguments.  The arrays are filled in the order given.
631     *</ol>
632     *<p>Called:<ul>
633     *     <li>{@link #jauPfw06} bias-precession F-W angles, IAU 2006
634     *     <li>{@link #jauFw2m} F-W angles to r-matrix
635     *     <li>{@link #jauPmat06} PB matrix, IAU 2006
636     *     <li>{@link #jauTr} transpose r-matrix
637     *     <li>{@link #jauRxr} product of two r-matrices
638     * </ul>
639     *<p>References:
640     *
641     *     <p>Capitaine, N. &amp;Wallace, P.T., 2006, Astron.Astrophys. 450, 855
642     *
643     *     <p>Wallace, P.T. &amp;Capitaine, N., 2006, Astron.Astrophys. 459, 981
644     *
645     *@version 2009 December 17
646     *
647     *  @since Release 20101201
648     *
649     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
650     */
651         public static void jauBp06(final double date1, final double date2,
652                  double rb[][], double rp[][], double rbp[][])
653     {
654        double rbt[][];
655 
656 
657     /* B matrix. */
658        FWPrecessionAngles fw = jauPfw06(DJM0, DJM00);
659        double[][] rt = jauFw2m(fw.gamb, fw.phib, fw.psib, fw.epsa);
660        jauCr(rt, rb);
661 
662     /* PxB matrix. */
663        rt = jauPmat06(date1, date2 );
664        jauCr(rt, rbp);
665 
666     /* P matrix. */
667        rbt = jauTr(rb);
668        rt = jauRxr(rbp, rbt);
669        jauCr(rt, rp);
670 
671        return;
672 
673         }
674     
675      /**
676      * The components x,y are components of the Celestial Intermediate
677      *     Pole unit vector in the Geocentric Celestial Reference System.
678      *     
679      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 29 Jan 2010
680      * 
681      * @since AIDA Stage 1
682      */
683     public static class CelestialIntermediatePole {
684          public double x; 
685          public double y;
686          public CelestialIntermediatePole(double x, double y) {
687             this.x = x;
688             this.y = y;
689         }
690      }
691     /**
692     *  Extract from the bias-precession-nutation matrix the X,Y coordinates
693     *  of the Celestial Intermediate Pole.
694     *
695     *<p>This function is derived from the International Astronomical Union's
696     *  SOFA (Standards Of Fundamental Astronomy) software collection.
697     *
698     *<p>Status:  support function.
699     *
700     *<!-- Given: -->
701     *     @param rbpn       double[3][3]   celestial-to-true matrix (Note 1)
702     *
703     *<!-- Returned: -->
704     *     @return     <u>returned</u> Celestial Intermediate Pole (Note 2)
705     *
706     * <p>Notes:
707     * <ol>
708     *
709     * <li> The matrix rbpn transforms vectors from GCRS to true equator (and
710     *     CIO or equinox) of date, and therefore the Celestial Intermediate
711     *     Pole unit vector is the bottom row of the matrix.
712     *
713     * <li> The arguments x,y are components of the Celestial Intermediate
714     *     Pole unit vector in the Geocentric Celestial Reference System.
715     *</ol>
716     *<p>Reference:
717     *
718     *     "Expressions for the Celestial Intermediate Pole and Celestial
719     *     Ephemeris Origin consistent with the IAU 2000A precession-
720     *     nutation model", Astron.Astrophys. 400, 1145-1154
721     *     (2003)
722     *
723     *     n.b. The celestial ephemeris origin (CEO) was renamed "celestial
724     *          intermediate origin" (CIO) by IAU 2006 Resolution 2.
725     *
726     *@version 2010 January 18
727     *
728     *  @since Release 20101201
729     *
730     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
731     */
732         public static CelestialIntermediatePole  jauBpn2xy(double rbpn[][])
733     {
734     /* Extract the X,Y coordinates. */
735 
736        return new CelestialIntermediatePole(rbpn[2][0], rbpn[2][1]);
737 
738         }
739     
740 
741     /**
742     *  Form the celestial-to-intermediate matrix for a given date using the
743     *  IAU 2000A precession-nutation model.
744     *
745     *<p>This function is derived from the International Astronomical Union's
746     *  SOFA (Standards Of Fundamental Astronomy) software collection.
747     *
748     *<p>Status:  support function.
749     *
750     *<!-- Given: -->
751     *     @param date1 double TT as a 2-part Julian Date (Note 1)
752     *     @param date2 double TT as a 2-part Julian Date (Note 1)
753     *
754     *<!-- Returned: -->
755     *     @return rc2i         double[3][3]   <u>returned</u> celestial-to-intermediate matrix (Note 2)
756     *
757     * <p>Notes:
758     * <ol>
759     *
760     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
761     *     convenient way between the two arguments.  For example,
762     *     JD(TT)=2450123.7 could be expressed in any of these ways,
763     *     among others:
764     *<pre>
765     *            date1          date2
766     *
767     *         2450123.7           0.0       (JD method)
768     *         2451545.0       -1421.3       (J2000 method)
769     *         2400000.5       50123.2       (MJD method)
770     *         2450123.5           0.2       (date &amp;time method)
771     *</pre>
772     *     The JD method is the most natural and convenient to use in
773     *     cases where the loss of several decimal digits of resolution
774     *     is acceptable.  The J2000 method is best matched to the way
775     *     the argument is handled internally and will deliver the
776     *     optimum resolution.  The MJD method and the date &amp;time methods
777     *     are both good compromises between resolution and convenience.
778     *
779     * <li> The matrix rc2i is the first stage in the transformation from
780     *     celestial to terrestrial coordinates:
781     *
782     *        [TRS]  =  RPOM * R_3(ERA) * rc2i * [CRS]
783     *
784     *               =  rc2t * [CRS]
785     *
786     *     where [CRS] is a vector in the Geocentric Celestial Reference
787     *     System and [TRS] is a vector in the International Terrestrial
788     *     Reference System (see IERS Conventions 2003), ERA is the Earth
789     *     Rotation Angle and RPOM is the polar motion matrix.
790     *
791     * <li> A faster, but slightly less accurate result (about 1 mas), can be
792     *     obtained by using instead the jauC2i00b function.
793     *</ol>
794     *<p>Called:<ul>
795     *     <li>{@link #jauPnm00a} classical NPB matrix, IAU 2000A
796     *     <li>{@link #jauC2ibpn} celestial-to-intermediate matrix, given NPB matrix
797     * </ul>
798     *<p>References:
799     *<ul>
800     *     <li>"Expressions for the Celestial Intermediate Pole and Celestial
801     *     Ephemeris Origin consistent with the IAU 2000A precession-
802     *     nutation model", Astron.Astrophys. 400, 1145-1154
803     *     (2003)
804     *
805     *     n.b. The celestial ephemeris origin (CEO) was renamed "celestial
806     *          intermediate origin" (CIO) by IAU 2006 Resolution 2.
807     *
808     *    <li>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
809     *     IERS Technical Note No. 32, BKG (2004)
810     *</ul>
811     *@version 2010 January 18
812     *
813     *  @since Release 20101201
814     *
815     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
816     */
817     public static double[][] jauC2i00a(double date1, double date2)
818     {
819 
820 
821     /* Obtain the celestial-to-true matrix (IAU 2000A). */
822        double rbpn[][] = jauPnm00a(date1, date2);
823 
824     /* Form the celestial-to-intermediate matrix. */
825        double rc2i[][]  =jauC2ibpn(date1, date2, rbpn);
826 
827        return rc2i;
828 
829         }
830     
831 
832     /**
833     *  Form the celestial-to-intermediate matrix for a given date using the
834     *  IAU 2000B precession-nutation model.
835     *
836     *<p>This function is derived from the International Astronomical Union's
837     *  SOFA (Standards Of Fundamental Astronomy) software collection.
838     *
839     *<p>Status:  support function.
840     *
841     *<!-- Given: -->
842     *     @param date1 double TT as a 2-part Julian Date (Note 1)
843     *     @param date2 double TT as a 2-part Julian Date (Note 1)
844     *
845     *<!-- Returned: -->
846     *     @return rc2i         double[3][3]   <u>returned</u> celestial-to-intermediate matrix (Note 2)
847     *
848     * <p>Notes:
849     * <ol>
850     *
851     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
852     *     convenient way between the two arguments.  For example,
853     *     JD(TT)=2450123.7 could be expressed in any of these ways,
854     *     among others:
855     *<pre>
856     *            date1          date2
857     *
858     *         2450123.7           0.0       (JD method)
859     *         2451545.0       -1421.3       (J2000 method)
860     *         2400000.5       50123.2       (MJD method)
861     *         2450123.5           0.2       (date &amp;time method)
862     *</pre>
863     *     The JD method is the most natural and convenient to use in
864     *     cases where the loss of several decimal digits of resolution
865     *     is acceptable.  The J2000 method is best matched to the way
866     *     the argument is handled internally and will deliver the
867     *     optimum resolution.  The MJD method and the date &amp;time methods
868     *     are both good compromises between resolution and convenience.
869     *
870     * <li> The matrix rc2i is the first stage in the transformation from
871     *     celestial to terrestrial coordinates:
872     *
873     *        [TRS]  =  RPOM * R_3(ERA) * rc2i * [CRS]
874     *
875     *               =  rc2t * [CRS]
876     *
877     *     where [CRS] is a vector in the Geocentric Celestial Reference
878     *     System and [TRS] is a vector in the International Terrestrial
879     *     Reference System (see IERS Conventions 2003), ERA is the Earth
880     *     Rotation Angle and RPOM is the polar motion matrix.
881     *
882     * <li> The present function is faster, but slightly less accurate (about
883     *     1 mas), than the jauC2i00a function.
884     *</ol>
885     *<p>Called:<ul>
886     *     <li>{@link #jauPnm00b} classical NPB matrix, IAU 2000B
887     *     <li>{@link #jauC2ibpn} celestial-to-intermediate matrix, given NPB matrix
888     * </ul>
889     *<p>References:
890     *
891     *    <p> "Expressions for the Celestial Intermediate Pole and Celestial
892     *     Ephemeris Origin consistent with the IAU 2000A precession-
893     *     nutation model", Astron.Astrophys. 400, 1145-1154
894     *     (2003)
895     *
896     *     n.b. The celestial ephemeris origin (CEO) was renamed "celestial
897     *          intermediate origin" (CIO) by IAU 2006 Resolution 2.
898     *
899     *    <p> McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
900     *     IERS Technical Note No. 32, BKG (2004)
901     *
902     *@version 2010 January 18
903     *
904     *  @since Release 20101201
905     *
906     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
907     */
908     public static double[][] jauC2i00b(double date1, double date2)
909     {
910        double rbpn[][];
911        double rc2i[][];
912 
913     /* Obtain the celestial-to-true matrix (IAU 2000B). */
914        rbpn = jauPnm00b(date1, date2 );
915 
916     /* Form the celestial-to-intermediate matrix. */
917        rc2i = jauC2ibpn(date1, date2, rbpn);
918 
919        return rc2i;
920 
921         }
922     
923 
924     /**
925     *  Form the celestial-to-intermediate matrix for a given date using the
926     *  IAU 2006 precession and IAU 2000A nutation models.
927     *
928     *<p>This function is derived from the International Astronomical Union's
929     *  SOFA (Standards Of Fundamental Astronomy) software collection.
930     *
931     *<p>Status:  support function.
932     *
933     *<!-- Given: -->
934     *     @param date1 double TT as a 2-part Julian Date (Note 1)
935     *     @param date2 double TT as a 2-part Julian Date (Note 1)
936     *
937     *<!-- Returned: -->
938     *     @return rc2i         double[3][3]   <u>returned</u> celestial-to-intermediate matrix (Note 2)
939     *
940     * <p>Notes:
941     * <ol>
942     *
943     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
944     *     convenient way between the two arguments.  For example,
945     *     JD(TT)=2450123.7 could be expressed in any of these ways,
946     *     among others:
947     *<pre>
948     *            date1          date2
949     *
950     *         2450123.7           0.0       (JD method)
951     *         2451545.0       -1421.3       (J2000 method)
952     *         2400000.5       50123.2       (MJD method)
953     *         2450123.5           0.2       (date &amp;time method)
954     *</pre>
955     *     The JD method is the most natural and convenient to use in
956     *     cases where the loss of several decimal digits of resolution
957     *     is acceptable.  The J2000 method is best matched to the way
958     *     the argument is handled internally and will deliver the
959     *     optimum resolution.  The MJD method and the date &amp;time methods
960     *     are both good compromises between resolution and convenience.
961     *
962     * <li> The matrix rc2i is the first stage in the transformation from
963     *     celestial to terrestrial coordinates:
964     *
965     *        [TRS]  =  RPOM * R_3(ERA) * rc2i * [CRS]
966     *
967     *               =  RC2T * [CRS]
968     *
969     *     where [CRS] is a vector in the Geocentric Celestial Reference
970     *     System and [TRS] is a vector in the International Terrestrial
971     *     Reference System (see IERS Conventions 2003), ERA is the Earth
972     *     Rotation Angle and RPOM is the polar motion matrix.
973     *</ol>
974     *<p>Called:<ul>
975     *     <li>{@link #jauPnm06a} classical NPB matrix, IAU 2006/2000A
976     *     <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
977     *     <li>{@link #jauS06} the CIO locator s, Given X,Y, IAU 2006
978     *     <li>{@link #jauC2ixys} celestial-to-intermediate matrix, Given X,Y and s
979     * </ul>
980     *<p>References:
981     *
982     *     <p>McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003),
983     *     IERS Technical Note No. 32, BKG
984     *
985     *@version 2008 May 13
986     *
987     *  @since Release 20101201
988     *
989     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
990     */
991     public static double[][] jauC2i06a(double date1, double date2)
992     {
993        double rbpn[][], s,  rc2i[][];
994 
995 
996     /* Obtain the celestial-to-true matrix (IAU 2006/2000A). */
997        rbpn = jauPnm06a(date1, date2);
998 
999     /* Extract the X,Y coordinates. */
1000        CelestialIntermediatePole cip = jauBpn2xy(rbpn);
1001 
1002     /* Obtain the CIO locator. */
1003        s = jauS06(date1, date2, cip.x, cip.y);
1004 
1005     /* Form the celestial-to-intermediate matrix. */
1006        rc2i = jauC2ixys(cip.x, cip.y, s);
1007 
1008        return rc2i;
1009 
1010         }
1011     
1012 
1013     /**
1014     *  Form the celestial-to-intermediate matrix for a given date given
1015     *  the bias-precession-nutation matrix.  IAU 2000.
1016     *
1017     *<p>This function is derived from the International Astronomical Union's
1018     *  SOFA (Standards Of Fundamental Astronomy) software collection.
1019     *
1020     *<p>Status:  support function.
1021     *
1022     *<!-- Given: -->
1023     *     @param date1 double TT as a 2-part Julian Date (Note 1)
1024     *     @param date2 double TT as a 2-part Julian Date (Note 1)
1025     *     @param rbpn         double[3][3]  celestial-to-true matrix (Note 2)
1026     *
1027     *<!-- Returned: -->
1028     *     @return rc2i         double[3][3]   <u>returned</u> celestial-to-intermediate matrix (Note 3)
1029     *
1030     * <p>Notes:
1031     * <ol>
1032     *
1033     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
1034     *     convenient way between the two arguments.  For example,
1035     *     JD(TT)=2450123.7 could be expressed in any of these ways,
1036     *     among others:
1037     *<pre>
1038     *            date1          date2
1039     *
1040     *         2450123.7           0.0       (JD method)
1041     *         2451545.0       -1421.3       (J2000 method)
1042     *         2400000.5       50123.2       (MJD method)
1043     *         2450123.5           0.2       (date &amp;time method)
1044     *</pre>
1045     *     The JD method is the most natural and convenient to use in
1046     *     cases where the loss of several decimal digits of resolution
1047     *     is acceptable.  The J2000 method is best matched to the way
1048     *     the argument is handled internally and will deliver the
1049     *     optimum resolution.  The MJD method and the date &amp;time methods
1050     *     are both good compromises between resolution and convenience.
1051     *
1052     * <li> The matrix rbpn transforms vectors from GCRS to true equator (and
1053     *     CIO or equinox) of date.  Only the CIP (bottom row) is used.
1054     *
1055     * <li> The matrix rc2i is the first stage in the transformation from
1056     *     celestial to terrestrial coordinates:
1057     *
1058     *        [TRS] = RPOM * R_3(ERA) * rc2i * [CRS]
1059     *
1060     *              = RC2T * [CRS]
1061     *
1062     *     where [CRS] is a vector in the Geocentric Celestial Reference
1063     *     System and [TRS] is a vector in the International Terrestrial
1064     *     Reference System (see IERS Conventions 2003), ERA is the Earth
1065     *     Rotation Angle and RPOM is the polar motion matrix.
1066     *
1067     * <li> Although its name does not include "00", This function is in fact
1068     *     specific to the IAU 2000 models.
1069     *</ol>
1070     *<p>Called:<ul>
1071     *     <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
1072     *     <li>{@link #jauC2ixy} celestial-to-intermediate matrix, given X,Y
1073     * </ul>
1074     *<p>References:
1075     *    <p> "Expressions for the Celestial Intermediate Pole and Celestial
1076     *     Ephemeris Origin consistent with the IAU 2000A precession-
1077     *     nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
1078     *
1079     *     <p>n.b. The celestial ephemeris origin (CEO) was renamed "celestial
1080     *          intermediate origin" (CIO) by IAU 2006 Resolution 2.
1081     *
1082     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
1083     *     IERS Technical Note No. 32, BKG (2004)
1084     *
1085     *@version 2010 January 18
1086     *
1087     *  @since Release 20101201
1088     *
1089     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
1090     */
1091     public static double[][] jauC2ibpn(double date1, double date2, double rbpn[][])
1092     {
1093 
1094     /* Extract the X,Y coordinates. */
1095        CelestialIntermediatePole cip = jauBpn2xy(rbpn);
1096        
1097        
1098     /* Form the celestial-to-intermediate matrix (n.b. IAU 2000 specific). */
1099        double rc2i[][] =jauC2ixy(date1, date2, cip.x, cip.y);
1100 
1101        return rc2i;
1102 
1103         }
1104     
1105 
1106     /**
1107     *  Form the celestial to intermediate-frame-of-date matrix for a given
1108     *  date when the CIP X,Y coordinates are known.  IAU 2000.
1109     *
1110     *<p>This function is derived from the International Astronomical Union's
1111     *  SOFA (Standards Of Fundamental Astronomy) software collection.
1112     *
1113     *<p>Status:  support function.
1114     *
1115     *<!-- Given: -->
1116     *     @param date1 double TT as a 2-part Julian Date (Note 1)
1117     *     @param date2 double TT as a 2-part Julian Date (Note 1)
1118     *     @param x double        Celestial Intermediate Pole (Note 2)
1119     *     @param y double        Celestial Intermediate Pole (Note 2) 
1120     *
1121     *<!-- Returned: -->
1122     *     @return rc2i         double[3][3]   <u>returned</u> celestial-to-intermediate matrix (Note 3)
1123     *
1124     * <p>Notes:
1125     * <ol>
1126     *
1127     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
1128     *     convenient way between the two arguments.  For example,
1129     *     JD(TT)=2450123.7 could be expressed in any of these ways,
1130     *     among others:
1131     *<pre>
1132     *            date1          date2
1133     *
1134     *         2450123.7           0.0       (JD method)
1135     *         2451545.0       -1421.3       (J2000 method)
1136     *         2400000.5       50123.2       (MJD method)
1137     *         2450123.5           0.2       (date &amp;time method)
1138     *</pre>
1139     *     The JD method is the most natural and convenient to use in
1140     *     cases where the loss of several decimal digits of resolution
1141     *     is acceptable.  The J2000 method is best matched to the way
1142     *     the argument is handled internally and will deliver the
1143     *     optimum resolution.  The MJD method and the date &amp;time methods
1144     *     are both good compromises between resolution and convenience.
1145     *
1146     * <li> The Celestial Intermediate Pole coordinates are the x,y components
1147     *     of the unit vector in the Geocentric Celestial Reference System.
1148     *
1149     * <li> The matrix rc2i is the first stage in the transformation from
1150     *     celestial to terrestrial coordinates:
1151     *
1152     *        [TRS] = RPOM * R_3(ERA) * rc2i * [CRS]
1153     *
1154     *              = RC2T * [CRS]
1155     *
1156     *     where [CRS] is a vector in the Geocentric Celestial Reference
1157     *     System and [TRS] is a vector in the International Terrestrial
1158     *     Reference System (see IERS Conventions 2003), ERA is the Earth
1159     *     Rotation Angle and RPOM is the polar motion matrix.
1160     *
1161     * <li> Although its name does not include "00", This function is in fact
1162     *     specific to the IAU 2000 models.
1163     *</ol>
1164     *<p>Called:<ul>
1165     *     <li>{@link #jauC2ixys} celestial-to-intermediate matrix, given X,Y and s
1166     *     <li>{@link #jauS00} the CIO locator s, given X,Y, IAU 2000A
1167     * </ul>
1168     *<p>Reference:
1169     *
1170     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
1171     *     IERS Technical Note No. 32, BKG (2004)
1172     *
1173     *@version 2008 May 11
1174     *
1175     *  @since Release 20101201
1176     *
1177     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
1178     */
1179 
1180     public static  double[][] jauC2ixy(double date1, double date2, double x, double y)
1181     {
1182     /* Compute s and then the matrix. */
1183        double rc2i[][] = jauC2ixys(x, y, jauS00(date1, date2, x, y));
1184 
1185        return rc2i;
1186 
1187         }
1188     
1189 
1190     /**
1191     *  Form the celestial to intermediate-frame-of-date matrix given the CIP
1192     *  X,Y and the CIO locator s.
1193     *
1194     *<p>This function is derived from the International Astronomical Union's
1195     *  SOFA (Standards Of Fundamental Astronomy) software collection.
1196     *
1197     *<p>Status:  support function.
1198     *
1199     *<!-- Given: -->
1200     *     @param x double          Celestial Intermediate Pole (Note 1)
1201     *     @param y double          Celestial Intermediate Pole (Note 1) 
1202     *     @param s         double          the CIO locator s (Note 2)
1203     *
1204     *<!-- Returned: -->
1205     *     @return rc2i      double[3][3]     <u>returned</u> celestial-to-intermediate matrix (Note 3)
1206     *
1207     * <p>Notes:
1208     * <ol>
1209     *
1210     * <li> The Celestial Intermediate Pole coordinates are the x,y
1211     *     components of the unit vector in the Geocentric Celestial
1212     *     Reference System.
1213     *
1214     * <li> The CIO locator s (in radians) positions the Celestial
1215     *     Intermediate Origin on the equator of the CIP.
1216     *
1217     * <li> The matrix rc2i is the first stage in the transformation from
1218     *     celestial to terrestrial coordinates:
1219     *
1220     *        [TRS] = RPOM * R_3(ERA) * rc2i * [CRS]
1221     *
1222     *              = RC2T * [CRS]
1223     *
1224     *     where [CRS] is a vector in the Geocentric Celestial Reference
1225     *     System and [TRS] is a vector in the International Terrestrial
1226     *     Reference System (see IERS Conventions 2003), ERA is the Earth
1227     *     Rotation Angle and RPOM is the polar motion matrix.
1228     *</ol>
1229     *<p>Called:<ul>
1230     *     <li>{@link #jauIr} initialize r-matrix to identity
1231     *     <li>{@link #jauRz} rotate around Z-axis
1232     *     <li>{@link #jauRy} rotate around Y-axis
1233     * </ul>
1234     *<p>Reference:
1235     *
1236     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
1237     *     IERS Technical Note No. 32, BKG (2004)
1238     *
1239     *@version 2008 May 11
1240     *
1241     *  @since Release 20101201
1242     *
1243     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
1244     */
1245     public static double[][] jauC2ixys(double x, double y, double s)
1246     {
1247        double r2, e, d;
1248        double rc2i[][] = new double[3][3];
1249 
1250     /* Obtain the spherical angles E and d. */
1251        r2 = x*x + y*y;
1252        e = (r2 > 0.0) ? atan2(y, x) : 0.0;
1253        d = atan(sqrt(r2 / (1.0 - r2)));
1254 
1255     /* Form the matrix. */
1256        jauIr(rc2i);
1257        jauRz(e, rc2i);
1258        jauRy(d, rc2i);
1259        jauRz(-(e+s), rc2i);
1260 
1261        return rc2i;
1262 
1263         }
1264     
1265     /**
1266     *  P-vector to spherical coordinates.
1267     *
1268     *<p>This function is derived from the International Astronomical Union's
1269     *  SOFA (Standards Of Fundamental Astronomy) software collection.
1270     *
1271     *<p>Status:  vector/matrix support function.
1272     *
1273     *<!-- Given: -->
1274     *     @param p       double[3]     p-vector
1275     *
1276     *<!-- Returned: -->
1277     *     @return theta   double         <u>returned</u> longitude angle (radians)
1278     *             phi     double         <u>returned</u> latitude angle (radians)
1279     *
1280     * <p>Notes:
1281     * <ol>
1282     *
1283     * <li> The vector p can have any magnitude; only its direction is used.
1284     *
1285     * <li> If p is null, zero theta and phi are returned.
1286     *
1287     * <li> At either pole, zero theta is returned.
1288     *</ol>
1289     *@version 2008 May 11
1290     *
1291     *  @since Release 20101201
1292     *
1293     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
1294     */
1295     public static SphericalCoordinate jauC2s(double p[])
1296     {
1297        double x, y, z, d2;
1298 
1299 
1300        x  = p[0];
1301        y  = p[1];
1302        z  = p[2];
1303        d2 = x*x + y*y;
1304 
1305        double theta = (d2 == 0.0) ? 0.0 : atan2(y, x);
1306        double phi = (z == 0.0) ? 0.0 : atan2(z, sqrt(d2));
1307 
1308        return new SphericalCoordinate(theta, phi);
1309 
1310         }
1311     
1312 
1313     /**
1314     *  Form the celestial to terrestrial matrix given the date, the UT1 and
1315     *  the polar motion, using the IAU 2000A nutation model.
1316     *
1317     *<p>This function is derived from the International Astronomical Union's
1318     *  SOFA (Standards Of Fundamental Astronomy) software collection.
1319     *
1320     *<p>Status:  support function.
1321     *
1322     *<!-- Given: -->
1323     *     @param tta double          TT as a 2-part Julian Date (Note 1)
1324     *     @param ttb double          TT as a 2-part Julian Date (Note 1) 
1325     *     @param uta double          UT1 as a 2-part Julian Date (Note 1)
1326     *     @param utb double          UT1 as a 2-part Julian Date (Note 1) 
1327     *     @param xp double          coordinates of the pole (radians, Note 2)
1328     *     @param yp double          coordinates of the pole (radians, Note 2) 
1329     *
1330     *<!-- Returned: -->
1331     *     @return rc2t      double[3][3]     <u>returned</u> celestial-to-terrestrial matrix (Note 3)
1332     *
1333     * <p>Notes:
1334     * <ol>
1335     *
1336     *   <li> The TT and UT1 dates tta+ttb and uta+utb are Julian Dates,
1337     *     apportioned in any convenient way between the arguments uta and
1338     *     utb.  For example, JD(UT1)=2450123.7 could be expressed in any of
1339     *     these ways, among others:
1340     *<pre>
1341     *             uta            utb
1342     *
1343     *         2450123.7           0.0       (JD method)
1344     *         2451545.0       -1421.3       (J2000 method)
1345     *         2400000.5       50123.2       (MJD method)
1346     *         2450123.5           0.2       (date &amp;time method)
1347     *</pre>
1348     *     The JD method is the most natural and convenient to use in
1349     *     cases where the loss of several decimal digits of resolution is
1350     *     acceptable.  The J2000 and MJD methods are good compromises
1351     *     between resolution and convenience.  In the case of uta,utb, the
1352     *     date &amp;time method is best matched to the Earth rotation angle
1353     *     algorithm used:  maximum precision is delivered when the uta
1354     *     argument is for 0hrs UT1 on the day in question and the utb
1355     *     argument lies in the range 0 to 1, or vice versa.
1356     *
1357     *  <li> The arguments xp and yp are the coordinates (in radians) of the
1358     *     Celestial Intermediate Pole with respect to the International
1359     *     Terrestrial Reference System (see IERS Conventions 2003),
1360     *     measured along the meridians to 0 and 90 deg west respectively.
1361     *
1362     * <li> The matrix rc2t transforms from celestial to terrestrial
1363     *     coordinates:
1364     *
1365     *        [TRS] = RPOM * R_3(ERA) * RC2I * [CRS]
1366     *
1367     *              = rc2t * [CRS]
1368     *
1369     *     where [CRS] is a vector in the Geocentric Celestial Reference
1370     *     System and [TRS] is a vector in the International Terrestrial
1371     *     Reference System (see IERS Conventions 2003), RC2I is the
1372     *     celestial-to-intermediate matrix, ERA is the Earth rotation
1373     *     angle and RPOM is the polar motion matrix.
1374     *
1375     * <li> A faster, but slightly less accurate result (about 1 mas), can
1376     *     be obtained by using instead the jauC2t00b function.
1377     *</ol>
1378     *<p>Called:<ul>
1379     *     <li>{@link #jauC2i00a} celestial-to-intermediate matrix, IAU 2000A
1380     *     <li>{@link #jauEra00} Earth rotation angle, IAU 2000
1381     *     <li>{@link #jauSp00} the TIO locator s', IERS 2000
1382     *     <li>{@link #jauPom00} polar motion matrix
1383     *     <li>{@link #jauC2tcio} form CIO-based celestial-to-terrestrial matrix
1384     * </ul>
1385     *<p>Reference:
1386     *
1387     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
1388     *     IERS Technical Note No. 32, BKG (2004)
1389     *
1390     *@version 2009 April 1
1391     *
1392     *  @since Release 20101201
1393     *
1394     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
1395     */
1396     public static  double[][] jauC2t00a(final double tta, final double ttb, final double uta, final double utb,
1397                    final double xp, final double yp)
1398     {
1399        double rc2i[][]= new double[3][3], era, sp, rpom[][];
1400 
1401 
1402     /* Form the celestial-to-intermediate matrix for this TT (IAU 2000A). */
1403        rc2i = jauC2i00a(tta, ttb);
1404 
1405     /* Predict the Earth rotation angle for this UT1. */
1406        era = jauEra00(uta, utb);
1407 
1408     /* Estimate s'. */
1409        sp = jauSp00(tta, ttb);
1410 
1411     /* Form the polar motion matrix. */
1412        rpom = jauPom00(xp, yp, sp );
1413 
1414     /* Combine to form the celestial-to-terrestrial matrix. */
1415        double[][] rc2t = jauC2tcio(rc2i, era, rpom );
1416 
1417        return rc2t;
1418 
1419         }
1420     
1421 
1422     /**
1423     *  Form the celestial to terrestrial matrix given the date, the UT1 and
1424     *  the polar motion, using the IAU 2000B nutation model.
1425     *
1426     *<p>This function is derived from the International Astronomical Union's
1427     *  SOFA (Standards Of Fundamental Astronomy) software collection.
1428     *
1429     *<p>Status:  support function.
1430     *
1431     *<!-- Given: -->
1432     *     @param tta double          TT as a 2-part Julian Date (Note 1)
1433     *     @param ttb double          TT as a 2-part Julian Date (Note 1) 
1434     *     @param uta double          UT1 as a 2-part Julian Date (Note 1)
1435     *     @param utb double          UT1 as a 2-part Julian Date (Note 1) 
1436     *     @param xp double          coordinates of the pole (radians, Note 2)
1437     *     @param yp double          coordinates of the pole (radians, Note 2) 
1438     *
1439     *<!-- Returned: -->
1440     *     @return rc2t      double[3][3]     <u>returned</u> celestial-to-terrestrial matrix (Note 3)
1441     *
1442     * <p>Notes:
1443     * <ol>
1444     *
1445     * <li> The TT and UT1 dates tta+ttb and uta+utb are Julian Dates,
1446     *     apportioned in any convenient way between the arguments uta and
1447     *     utb.  For example, JD(UT1)=2450123.7 could be expressed in any of
1448     *     these ways, among others:
1449     *<pre>
1450     *             uta            utb
1451     *
1452     *         2450123.7           0.0       (JD method)
1453     *         2451545.0       -1421.3       (J2000 method)
1454     *         2400000.5       50123.2       (MJD method)
1455     *         2450123.5           0.2       (date &amp;time method)
1456     *</pre>
1457     *     The JD method is the most natural and convenient to use in
1458     *     cases where the loss of several decimal digits of resolution is
1459     *     acceptable.  The J2000 and MJD methods are good compromises
1460     *     between resolution and convenience.  In the case of uta,utb, the
1461     *     date &amp;time method is best matched to the Earth rotation angle
1462     *     algorithm used:  maximum precision is delivered when the uta
1463     *     argument is for 0hrs UT1 on the day in question and the utb
1464     *     argument lies in the range 0 to 1, or vice versa.
1465     *
1466     * <li> The arguments xp and yp are the coordinates (in radians) of the
1467     *     Celestial Intermediate Pole with respect to the International
1468     *     Terrestrial Reference System (see IERS Conventions 2003),
1469     *     measured along the meridians to 0 and 90 deg west respectively.
1470     *
1471     * <li> The matrix rc2t transforms from celestial to terrestrial
1472     *     coordinates:
1473     *
1474     *        [TRS] = RPOM * R_3(ERA) * RC2I * [CRS]
1475     *
1476     *              = rc2t * [CRS]
1477     *
1478     *     where [CRS] is a vector in the Geocentric Celestial Reference
1479     *     System and [TRS] is a vector in the International Terrestrial
1480     *     Reference System (see IERS Conventions 2003), RC2I is the
1481     *     celestial-to-intermediate matrix, ERA is the Earth rotation
1482     *     angle and RPOM is the polar motion matrix.
1483     *
1484     * <li> The present function is faster, but slightly less accurate (about
1485     *     1 mas), than the jauC2t00a function.
1486     *</ol>
1487     *<p>Called:<ul>
1488     *     <li>{@link #jauC2i00b} celestial-to-intermediate matrix, IAU 2000B
1489     *     <li>{@link #jauEra00} Earth rotation angle, IAU 2000
1490     *     <li>{@link #jauPom00} polar motion matrix
1491     *     <li>{@link #jauC2tcio} form CIO-based celestial-to-terrestrial matrix
1492     * </ul>
1493     *<p>Reference:
1494     *
1495     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
1496     *     IERS Technical Note No. 32, BKG (2004)
1497     *
1498     *@version 2009 April 1
1499     *
1500     *  @since Release 20101201
1501     *
1502     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
1503     */
1504     public static double[][] jauC2t00b(final double tta, final double ttb, final double uta, final double utb,
1505                    final double xp, final double yp )
1506     {
1507        double rc2i[][], era, rpom[][];
1508        double rc2t[][];
1509 
1510     /* Form the celestial-to-intermediate matrix for this TT (IAU 2000B). */
1511        rc2i =jauC2i00b(tta, ttb);
1512 
1513     /* Predict the Earth rotation angle for this UT1. */
1514        era = jauEra00(uta, utb);
1515 
1516     /* Form the polar motion matrix (neglecting s'). */
1517        rpom = jauPom00(xp, yp, 0.0 );
1518 
1519     /* Combine to form the celestial-to-terrestrial matrix. */
1520        rc2t = jauC2tcio(rc2i, era, rpom );
1521 
1522        return rc2t;
1523 
1524         }
1525     
1526 
1527     /**
1528     *  Form the celestial to terrestrial matrix given the date, the UT1 and
1529     *  the polar motion, using the IAU 2006 precession and IAU 2000A
1530     *  nutation models.
1531     *
1532     *<p>This function is derived from the International Astronomical Union's
1533     *  SOFA (Standards Of Fundamental Astronomy) software collection.
1534     *
1535     *<p>Status:  support function.
1536     *
1537     *<!-- Given: -->
1538     *     @param tta double          TT as a 2-part Julian Date (Note 1)
1539     *     @param ttb double          TT as a 2-part Julian Date (Note 1) 
1540     *     @param uta double          UT1 as a 2-part Julian Date (Note 1)
1541     *     @param utb double          UT1 as a 2-part Julian Date (Note 1) 
1542     *     @param xp double          coordinates of the pole (radians, Note 2)
1543     *     @param yp double          coordinates of the pole (radians, Note 2) 
1544     *
1545     *<!-- Returned: -->
1546     *     @return rc2t      double[3][3]     <u>returned</u> celestial-to-terrestrial matrix (Note 3)
1547     *
1548     * <p>Notes:
1549     * <ol>
1550     *
1551     * <li> The TT and UT1 dates tta+ttb and uta+utb are Julian Dates,
1552     *     apportioned in any convenient way between the arguments uta and
1553     *     utb.  For example, JD(UT1)=2450123.7 could be expressed in any of
1554     *     these ways, among others:
1555     *<pre>
1556     *             uta            utb
1557     *
1558     *         2450123.7           0.0       (JD method)
1559     *         2451545.0       -1421.3       (J2000 method)
1560     *         2400000.5       50123.2       (MJD method)
1561     *         2450123.5           0.2       (date &amp;time method)
1562     *</pre>
1563     *     The JD method is the most natural and convenient to use in
1564     *     cases where the loss of several decimal digits of resolution is
1565     *     acceptable.  The J2000 and MJD methods are good compromises
1566     *     between resolution and convenience.  In the case of uta,utb, the
1567     *     date &amp;time method is best matched to the Earth rotation angle
1568     *     algorithm used:  maximum precision is delivered when the uta
1569     *     argument is for 0hrs UT1 on the day in question and the utb
1570     *     argument lies in the range 0 to 1, or vice versa.
1571     *
1572     * <li> The arguments xp and yp are the coordinates (in radians) of the
1573     *     Celestial Intermediate Pole with respect to the International
1574     *     Terrestrial Reference System (see IERS Conventions 2003),
1575     *     measured along the meridians to 0 and 90 deg west respectively.
1576     *
1577     * <li> The matrix rc2t transforms from celestial to terrestrial
1578     *     coordinates:
1579     *
1580     *        [TRS] = RPOM * R_3(ERA) * RC2I * [CRS]
1581     *
1582     *              = rc2t * [CRS]
1583     *
1584     *     where [CRS] is a vector in the Geocentric Celestial Reference
1585     *     System and [TRS] is a vector in the International Terrestrial
1586     *     Reference System (see IERS Conventions 2003), RC2I is the
1587     *     celestial-to-intermediate matrix, ERA is the Earth rotation
1588     *     angle and RPOM is the polar motion matrix.
1589     *</ol>
1590     *<p>Called:<ul>
1591     *     <li>{@link #jauC2i06a} celestial-to-intermediate matrix, IAU 2006/2000A
1592     *     <li>{@link #jauEra00} Earth rotation angle, IAU 2000
1593     *     <li>{@link #jauSp00} the TIO locator s', IERS 2000
1594     *     <li>{@link #jauPom00} polar motion matrix
1595     *     <li>{@link #jauC2tcio} form CIO-based celestial-to-terrestrial matrix
1596     * </ul>
1597     *<p>Reference:
1598     *
1599     *     <p>McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003),
1600     *     IERS Technical Note No. 32, BKG
1601     *
1602     *@version 2009 April 1
1603     *
1604     *  @since Release 20101201
1605     *
1606     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
1607     */
1608     public static double[][] jauC2t06a(final double tta, final double ttb, final double uta, final double utb,
1609                   final double xp, final double yp)
1610     {
1611        double rc2i[][], era, sp, rpom[][], rc2t[][];
1612 
1613 
1614     /* Form the celestial-to-intermediate matrix for this TT. */
1615        rc2i = jauC2i06a(tta, ttb);
1616 
1617     /* Predict the Earth rotation angle for this UT1. */
1618        era = jauEra00(uta, utb);
1619 
1620     /* Estimate s'. */
1621        sp = jauSp00(tta, ttb);
1622 
1623     /* Form the polar motion matrix. */
1624        rpom = jauPom00(xp, yp, sp );
1625 
1626     /* Combine to form the celestial-to-terrestrial matrix. */
1627        rc2t = jauC2tcio(rc2i, era, rpom );
1628 
1629        return rc2t;
1630 
1631         }
1632     
1633 
1634     /**
1635     *  Assemble the celestial to terrestrial matrix from CIO-based
1636     *  components (the celestial-to-intermediate matrix, the Earth Rotation
1637     *  Angle and the polar motion matrix).
1638     *
1639     *<p>This function is derived from the International Astronomical Union's
1640     *  SOFA (Standards Of Fundamental Astronomy) software collection.
1641     *
1642     *<p>Status:  support function.
1643     *
1644     *<!-- Given: -->
1645     *     @param rc2i      double[3][3]     celestial-to-intermediate matrix
1646     *     @param era       double           Earth rotation angle (radians)
1647     *     @param rpom      double[3][3]     polar-motion matrix
1648     *
1649     *<!-- Returned: -->
1650     *     @return rc2t      double[3][3]      <u>returned</u> celestial-to-terrestrial matrix
1651     *
1652     * <p>Notes:
1653     * <ol>
1654     *
1655     * <li> This function constructs the rotation matrix that transforms
1656     *     vectors in the celestial system into vectors in the terrestrial
1657     *     system.  It does so starting from precomputed components, namely
1658     *     the matrix which rotates from celestial coordinates to the
1659     *     intermediate frame, the Earth rotation angle and the polar motion
1660     *     matrix.  One use of the present function is when generating a
1661     *     series of celestial-to-terrestrial matrices where only the Earth
1662     *     Rotation Angle changes, avoiding the considerable overhead of
1663     *     recomputing the precession-nutation more often than necessary to
1664     *     achieve given accuracy objectives.
1665     *
1666     * <li> The relationship between the arguments is as follows:
1667     *
1668     *        [TRS] = RPOM * R_3(ERA) * rc2i * [CRS]
1669     *
1670     *              = rc2t * [CRS]
1671     *
1672     *     where [CRS] is a vector in the Geocentric Celestial Reference
1673     *     System and [TRS] is a vector in the International Terrestrial
1674     *     Reference System (see IERS Conventions 2003).
1675     *</ol>
1676     *<p>Called:<ul>
1677     *     <li>{@link #jauCr} copy r-matrix
1678     *     <li>{@link #jauRz} rotate around Z-axis
1679     *     <li>{@link #jauRxr} product of two r-matrices
1680     * </ul>
1681     *<p>Reference:
1682     *
1683     *     <p>McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003),
1684     *     IERS Technical Note No. 32, BKG
1685     *
1686     *@version 2008 May 11
1687     *
1688     *  @since Release 20101201
1689     *
1690     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
1691     */
1692     public static double[][] jauC2tcio(final double rc2i[][], final double era, final double rpom[][])
1693     {
1694        double r[][] = new double[3][3];
1695 
1696 
1697     /* Construct the matrix. */
1698        jauCr(rc2i, r);
1699        jauRz(era, r);
1700        double[][] rc2t = jauRxr(rpom, r);
1701 
1702        return rc2t;
1703 
1704         }
1705     
1706 
1707     /**
1708     *  Assemble the celestial to terrestrial matrix from equinox-based
1709     *  components (the celestial-to-true matrix, the Greenwich Apparent
1710     *  Sidereal Time and the polar motion matrix).
1711     *
1712     *<p>This function is derived from the International Astronomical Union's
1713     *  SOFA (Standards Of Fundamental Astronomy) software collection.
1714     *
1715     *<p>Status:  support function.
1716     *
1717     *<!-- Given: -->
1718     *     @param rbpn      double[3][3]     celestial-to-true matrix
1719     *     @param gst       double           Greenwich (apparent) Sidereal Time (radians)
1720     *     @param rpom      double[3][3]     polar-motion matrix
1721     *
1722     *<!-- Returned: -->
1723     *     @return rc2t      double[3][3]      <u>returned</u> celestial-to-terrestrial matrix (Note 2)
1724     *
1725     * <p>Notes:
1726     * <ol>
1727     *
1728     * <li> This function constructs the rotation matrix that transforms
1729     *     vectors in the celestial system into vectors in the terrestrial
1730     *     system.  It does so starting from precomputed components, namely
1731     *     the matrix which rotates from celestial coordinates to the
1732     *     true equator and equinox of date, the Greenwich Apparent Sidereal
1733     *     Time and the polar motion matrix.  One use of the present function
1734     *     is when generating a series of celestial-to-terrestrial matrices
1735     *     where only the Sidereal Time changes, avoiding the considerable
1736     *     overhead of recomputing the precession-nutation more often than
1737     *     necessary to achieve given accuracy objectives.
1738     *
1739     * <li> The relationship between the arguments is as follows:
1740     *
1741     *        [TRS] = rpom * R_3(gst) * rbpn * [CRS]
1742     *
1743     *              = rc2t * [CRS]
1744     *
1745     *     where [CRS] is a vector in the Geocentric Celestial Reference
1746     *     System and [TRS] is a vector in the International Terrestrial
1747     *     Reference System (see IERS Conventions 2003).
1748     *</ol>
1749     *<p>Called:<ul>
1750     *     <li>{@link #jauCr} copy r-matrix
1751     *     <li>{@link #jauRz} rotate around Z-axis
1752     *     <li>{@link #jauRxr} product of two r-matrices
1753     * </ul>
1754     *<p>Reference:
1755     *
1756     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
1757     *     IERS Technical Note No. 32, BKG (2004)
1758     *
1759     *@version 2008 May 11
1760     *
1761     *  @since Release 20101201
1762     *
1763     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
1764     */
1765     public static double[][] jauC2teqx(final double rbpn[][], final double gst, final double rpom[][] )
1766     {
1767        double r[][] = new double[3][3], rc2t[][];
1768 
1769 
1770     /* Construct the matrix. */
1771        jauCr(rbpn, r);
1772        jauRz(gst, r);
1773        rc2t = jauRxr(rpom, r);
1774 
1775        return rc2t;
1776 
1777         }
1778     
1779 
1780     /**
1781     *  Form the celestial to terrestrial matrix given the date, the UT1,
1782     *  the nutation and the polar motion.  IAU 2000.
1783     *
1784     *<p>This function is derived from the International Astronomical Union's
1785     *  SOFA (Standards Of Fundamental Astronomy) software collection.
1786     *
1787     *<p>Status:  support function.
1788     *
1789     *<!-- Given: -->
1790     *     @param tta double         TT as a 2-part Julian Date (Note 1)
1791     *     @param ttb double         TT as a 2-part Julian Date (Note 1) 
1792     *     @param uta double         UT1 as a 2-part Julian Date (Note 1)
1793     *     @param utb double         UT1 as a 2-part Julian Date (Note 1) 
1794     *     @param dpsi double         nutation (Note 2)
1795     *     @param deps double         nutation (Note 2) 
1796     *     @param xp double         coordinates of the pole (radians, Note 3)
1797     *     @param yp double         coordinates of the pole (radians, Note 3) 
1798     *
1799     *<!-- Returned: -->
1800     *     @return rc2t        double[3][3]    <u>returned</u> celestial-to-terrestrial matrix (Note 4)
1801     *
1802     * <p>Notes:
1803     * <ol>
1804     *
1805     * <li> The TT and UT1 dates tta+ttb and uta+utb are Julian Dates,
1806     *     apportioned in any convenient way between the arguments uta and
1807     *     utb.  For example, JD(UT1)=2450123.7 could be expressed in any of
1808     *     these ways, among others:
1809     *<pre>
1810     *             uta            utb
1811     *
1812     *         2450123.7           0.0       (JD method)
1813     *         2451545.0       -1421.3       (J2000 method)
1814     *         2400000.5       50123.2       (MJD method)
1815     *         2450123.5           0.2       (date &amp;time method)
1816     *</pre>
1817     *     The JD method is the most natural and convenient to use in
1818     *     cases where the loss of several decimal digits of resolution is
1819     *     acceptable.  The J2000 and MJD methods are good compromises
1820     *     between resolution and convenience.  In the case of uta,utb, the
1821     *     date &amp;time method is best matched to the Earth rotation angle
1822     *     algorithm used:  maximum precision is delivered when the uta
1823     *     argument is for 0hrs UT1 on the day in question and the utb
1824     *     argument lies in the range 0 to 1, or vice versa.
1825     *
1826     * <li> The caller is responsible for providing the nutation components;
1827     *     they are in longitude and obliquity, in radians and are with
1828     *     respect to the equinox and ecliptic of date.  For high-accuracy
1829     *     applications, free core nutation should be included as well as
1830     *     any other relevant corrections to the position of the CIP.
1831     *
1832     * <li> The arguments xp and yp are the coordinates (in radians) of the
1833     *     Celestial Intermediate Pole with respect to the International
1834     *     Terrestrial Reference System (see IERS Conventions 2003),
1835     *     measured along the meridians to 0 and 90 deg west respectively.
1836     *
1837     * <li> The matrix rc2t transforms from celestial to terrestrial
1838     *     coordinates:
1839     *
1840     *        [TRS] = RPOM * R_3(GST) * RBPN * [CRS]
1841     *
1842     *              = rc2t * [CRS]
1843     *
1844     *     where [CRS] is a vector in the Geocentric Celestial Reference
1845     *     System and [TRS] is a vector in the International Terrestrial
1846     *     Reference System (see IERS Conventions 2003), RBPN is the
1847     *     bias-precession-nutation matrix, GST is the Greenwich (apparent)
1848     *     Sidereal Time and RPOM is the polar motion matrix.
1849     *
1850     * <li> Although its name does not include "00", This function is in fact
1851     *     specific to the IAU 2000 models.
1852     *</ol>
1853     *<p>Called:<ul>
1854     *     <li>{@link #jauPn00} bias/precession/nutation results, IAU 2000
1855     *     <li>{@link #jauGmst00} Greenwich mean sidereal time, IAU 2000
1856     *     <li>{@link #jauSp00} the TIO locator s', IERS 2000
1857     *     <li>{@link #jauEe00} equation of the equinoxes, IAU 2000
1858     *     <li>{@link #jauPom00} polar motion matrix
1859     *     <li>{@link #jauC2teqx} form equinox-based celestial-to-terrestrial matrix
1860     * </ul>
1861     *<p>Reference:
1862     *
1863     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
1864     *     IERS Technical Note No. 32, BKG (2004)
1865     *
1866     *@version 2009 April 1
1867     *
1868     *  @since Release 20101201
1869     *
1870     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
1871     */
1872     public static double[][] jauC2tpe(final double tta, final double ttb, final double uta, final double utb,
1873             final double dpsi, final double deps, final double xp, final double yp)
1874     {
1875        double rpom[][]; 
1876 
1877     /* Form the celestial-to-true matrix for this TT. */
1878        PrecessionNutation pn = jauPn00(tta, ttb, dpsi, deps);
1879 
1880     /* Predict the Greenwich Mean Sidereal Time for this UT1 and TT. */
1881        double gmst = jauGmst00(uta, utb, tta, ttb);
1882 
1883     /* Predict the equation of the equinoxes given TT and nutation. */
1884        double ee = jauEe00(tta, ttb, pn.epsa, dpsi);
1885 
1886     /* Estimate s'. */
1887        double sp = jauSp00(tta, ttb);
1888 
1889     /* Form the polar motion matrix. */
1890        rpom = jauPom00(xp, yp, sp);
1891 
1892     /* Combine to form the celestial-to-terrestrial matrix. */
1893        double[][] rc2t = jauC2teqx(pn.rbpn, gmst + ee, rpom );
1894 
1895        return rc2t;
1896 
1897         }
1898     
1899 
1900     /**
1901     *  Form the celestial to terrestrial matrix given the date, the UT1,
1902     *  the CIP coordinates and the polar motion.  IAU 2000.
1903     *
1904     *<p>This function is derived from the International Astronomical Union's
1905     *  SOFA (Standards Of Fundamental Astronomy) software collection.
1906     *
1907     *<p>Status:  support function.
1908     *
1909     *<!-- Given: -->
1910     *     @param tta double          TT as a 2-part Julian Date (Note 1)
1911     *     @param ttb double          TT as a 2-part Julian Date (Note 1) 
1912     *     @param uta double          UT1 as a 2-part Julian Date (Note 1)
1913     *     @param utb double          UT1 as a 2-part Julian Date (Note 1) 
1914     *     @param x double          Celestial Intermediate Pole (Note 2)
1915     *     @param y double          Celestial Intermediate Pole (Note 2) 
1916     *     @param xp double          coordinates of the pole (radians, Note 3)
1917     *     @param yp double          coordinates of the pole (radians, Note 3) 
1918     *
1919     *<!-- Returned: -->
1920     *     @return rc2t      double[3][3]     <u>returned</u> celestial-to-terrestrial matrix (Note 4)
1921     *
1922     * <p>Notes:
1923     * <ol>
1924     *
1925     * <li> The TT and UT1 dates tta+ttb and uta+utb are Julian Dates,
1926     *     apportioned in any convenient way between the arguments uta and
1927     *     utb.  For example, JD(UT1)=2450123.7 could be expressed in any o
1928     *     these ways, among others:
1929     *<pre>
1930     *             uta            utb
1931     *
1932     *         2450123.7           0.0       (JD method)
1933     *         2451545.0       -1421.3       (J2000 method)
1934     *         2400000.5       50123.2       (MJD method)
1935     *         2450123.5           0.2       (date &amp;time method)
1936     *</pre>
1937     *     The JD method is the most natural and convenient to use in
1938     *     cases where the loss of several decimal digits of resolution is
1939     *     acceptable.  The J2000 and MJD methods are good compromises
1940     *     between resolution and convenience.  In the case of uta,utb, the
1941     *     date &amp;time method is best matched to the Earth rotation angle
1942     *     algorithm used:  maximum precision is delivered when the uta
1943     *     argument is for 0hrs UT1 on the day in question and the utb
1944     *     argument lies in the range 0 to 1, or vice versa.
1945     *
1946     * <li> The Celestial Intermediate Pole coordinates are the x,y
1947     *     components of the unit vector in the Geocentric Celestial
1948     *     Reference System.
1949     *
1950     * <li> The arguments xp and yp are the coordinates (in radians) of the
1951     *     Celestial Intermediate Pole with respect to the International
1952     *     Terrestrial Reference System (see IERS Conventions 2003),
1953     *     measured along the meridians to 0 and 90 deg west respectively.
1954     *
1955     * <li> The matrix rc2t transforms from celestial to terrestrial
1956     *     coordinates:
1957     *
1958     *        [TRS] = RPOM * R_3(ERA) * RC2I * [CRS]
1959     *
1960     *              = rc2t * [CRS]
1961     *
1962     *     where [CRS] is a vector in the Geocentric Celestial Reference
1963     *     System and [TRS] is a vector in the International Terrestrial
1964     *     Reference System (see IERS Conventions 2003), ERA is the Earth
1965     *     Rotation Angle and RPOM is the polar motion matrix.
1966     *
1967     * <li> Although its name does not include "00", This function is in fact
1968     *     specific to the IAU 2000 models.
1969     *</ol>
1970     *<p>Called:<ul>
1971     *     <li>{@link #jauC2ixy} celestial-to-intermediate matrix, given X,Y
1972     *     <li>{@link #jauEra00} Earth rotation angle, IAU 2000
1973     *     <li>{@link #jauSp00} the TIO locator s', IERS 2000
1974     *     <li>{@link #jauPom00} polar motion matrix
1975     *     <li>{@link #jauC2tcio} form CIO-based celestial-to-terrestrial matrix
1976     * </ul>
1977     * Reference:
1978     *
1979     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
1980     *     IERS Technical Note No. 32, BKG (2004)
1981     *
1982     *@version 2009 April 1
1983     *
1984     *  @since Release 20101201
1985     *
1986     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
1987     */
1988     public static double[][] jauC2txy(double tta, double ttb, double uta, double utb,
1989                   double x, double y, double xp, double yp)
1990     {
1991        double rc2i[][] = new double[3][3], era, sp, rpom[][] = new double[3][3];
1992 
1993 
1994     /* Form the celestial-to-intermediate matrix for this TT. */
1995        rc2i = jauC2ixy(tta, ttb, x, y);
1996 
1997     /* Predict the Earth rotation angle for this UT1. */
1998        era = jauEra00(uta, utb);
1999 
2000     /* Estimate s'. */
2001        sp = jauSp00(tta, ttb);
2002 
2003     /* Form the polar motion matrix. */
2004        rpom = jauPom00(xp, yp, sp);
2005 
2006     /* Combine to form the celestial-to-terrestrial matrix. */
2007        double[][] rc2t = jauC2tcio(rc2i, era, rpom );
2008 
2009        return rc2t;
2010 
2011         }
2012     
2013     /**
2014     *  Gregorian Calendar to Julian Date.
2015     *
2016     *<p>This function is derived from the International Astronomical Union's
2017     *  SOFA (Standards Of Fundamental Astronomy) software collection.
2018     *
2019     *<p>Status:  support function.
2020     *
2021     *<!-- Given: -->
2022     *     @param iy,im,id   int      year, month, day in Gregorian calendar (Note 1)
2023     *
2024     *<!-- Returned: -->
2025     *     @return d MJD zero-point: always 2400000.5
2026     *       <u>returned</u> Modified Julian Date for 0 hrs
2027     *
2028     * <!-- Returned (function value): -->
2029     *  @throws JSOFAIllegalParameter      status:
2030     *                           0 = OK
2031     *                          -1 = bad year   (Note 3: JD not computed)
2032     *                          -2 = bad month  (JD not computed)
2033     *                          -3 = bad day    (JD computed)
2034     *
2035     * <p>Notes:
2036     * <ol>
2037     *
2038     * <li> The algorithm used is valid from -4800 March 1, but this
2039     *     implementation rejects dates before -4799 January 1.
2040     *
2041     * <li> The Julian Date is returned in two pieces, in the usual JSOFA
2042     *     manner, which is designed to preserve time resolution.  The
2043     *     Julian Date is available as a single number by adding djm0 and
2044     *     djm.
2045     *
2046     * <li> In early eras the conversion is from the "Proleptic Gregorian
2047     *     Calendar";  no account is taken of the date(s) of adoption of
2048     *     the Gregorian Calendar, nor is the AD/BC numbering convention
2049     *     observed.
2050     *</ol>
2051     *<p>Reference:
2052     *
2053     *     <p>Explanatory Supplement to the Astronomical Almanac,
2054     *     P. Kenneth Seidelmann (ed), University Science Books (1992),
2055     *     Section 12.92 (p604).
2056     *
2057     *@version 2009 October 19
2058     *
2059     *  @since Release 20101201
2060     *
2061     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
2062     */
2063     public static JulianDate jauCal2jd(int iy, int im, int id) throws JSOFAIllegalParameter
2064     {
2065        int ly, my;
2066        long iypmy;
2067        double djm0, djm;
2068 
2069     /* Earliest year allowed (4800BC) */
2070        final int IYMIN = -4799;
2071 
2072     /* Month lengths in days */
2073        final int mtab[]
2074                          = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
2075 
2076 
2077     /* Validate year and month. */
2078        if (iy < IYMIN) throw new JSOFAIllegalParameter("bad year", -1);
2079        if (im < 1 || im > 12) throw new JSOFAIllegalParameter("bad month", -2);
2080 
2081     /* If February in a leap year, 1, otherwise 0. */
2082        ly = ((im == 2) &&(iy%4 == 0) && (iy%100 != 0 || (iy%400 == 0)))?1:0;
2083 
2084     /* Validate day, taking into account leap years. */
2085        if ( (id < 1) || (id > (mtab[im-1] + ly))) {
2086     }
2087 
2088     /* Return result. */
2089        my = (im - 14) / 12;
2090        iypmy = (long) (iy + my);
2091        djm0 = DJM0;
2092        djm = (double)((1461L * (iypmy + 4800L)) / 4L
2093                      + (367L * (long) (im - 2 - 12 * my)) / 12L
2094                      - (3L * ((iypmy + 4900L) / 100L)) / 4L
2095                      + (long) id - 2432076L);
2096 
2097     /* Return status. */
2098        return new JulianDate(djm0, djm);
2099 
2100         }
2101     
2102 
2103     /**
2104     *  Copy a p-vector.
2105     *
2106     *<p>This function is derived from the International Astronomical Union's
2107     *  SOFA (Standards Of Fundamental Astronomy) software collection.
2108     *
2109     *<p>Status:  vector/matrix support function.
2110     *
2111     *<!-- Given: -->
2112     *     @param p         double[3]      p-vector to be copied
2113     *
2114     *<!-- Returned: -->
2115     *     @param c         double[3]       <u>given and returned</u> copy
2116     *
2117     *@version 2008 May 11
2118     *
2119     *  @since Release 20101201
2120     *
2121     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
2122     */
2123     public static double[] jauCp(double p[], double c[])
2124     {
2125        
2126        c[0] = p[0];
2127        c[1] = p[1];
2128        c[2] = p[2];
2129 
2130        return c;
2131 
2132     }
2133     
2134 
2135     /**
2136     *  Copy a position/velocity vector.
2137     *
2138     *<p>This function is derived from the International Astronomical Union's
2139     *  SOFA (Standards Of Fundamental Astronomy) software collection.
2140     *
2141     *<p>Status:  vector/matrix support function.
2142     *
2143     *<!-- Given: -->
2144     *     @param pv      double[2][3]     position/velocity vector to be copied
2145     *
2146     *<!-- Returned: -->
2147     *     @return c       double[2][3]      <u>returned</u> copy
2148     *
2149     *<p>Called:<ul>
2150     *     <li>{@link #jauCp} copy p-vector
2151     * </ul>
2152     *@version 2008 May 11
2153     *
2154     *  @since Release 20101201
2155     *
2156     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
2157     */
2158     public static double[][] jauCpv(double pv[][],  double c[][])
2159     {
2160 
2161         c[0]=jauCp(pv[0], c[0]);
2162         c[1]=jauCp(pv[1], c[1]);
2163 
2164        return c;
2165 
2166         }
2167     
2168 
2169     /**
2170     *  Copy an r-matrix.
2171     *
2172     *<p>This function is derived from the International Astronomical Union's
2173     *  SOFA (Standards Of Fundamental Astronomy) software collection.
2174     *
2175     *<p>Status:  vector/matrix support function.
2176     *
2177     *<!-- Given: -->
2178     *     @param r         double[3][3]     r-matrix to be copied.
2179     *
2180     *<!-- Returned: -->
2181     *   @param c      double[3][3]      <u>given and returned</u> the elements of r are copied into this.
2182     *
2183     *<p>Called:<ul>
2184     *     <li>{@link #jauCp} copy p-vector
2185     * </ul>
2186     *@version 2008 May 11
2187     *
2188     *  @since Release 20101201
2189     *
2190     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
2191     */
2192     public static void jauCr(double r[][], double c[][] )
2193     {
2194 
2195        jauCp(r[0], c[0]);
2196        jauCp(r[1], c[1]);
2197        jauCp(r[2], c[2]);
2198 
2199        return;
2200 
2201         }
2202     
2203 
2204     /**
2205     *  Decompose days to hours, minutes, seconds, fraction.
2206     *
2207     *<p>This function is derived from the International Astronomical Union's
2208     *  SOFA (Standards Of Fundamental Astronomy) software collection.
2209     *
2210     *<p>Status:  vector/matrix support function.
2211     *
2212     *<!-- Given: -->
2213     *     @param ndp      int      resolution (Note 1)
2214     *     @param days     double   interval in days
2215     *
2216     *<!-- Returned: -->
2217     *     @param ihmsf    int[4]    <u>returned</u> hours, minutes, seconds, fraction
2218     *     @return sign     char      <u>returned</u> '+' or '-'
2219     *
2220     * <p>Notes:
2221     * <ol>
2222     *
2223     * <li> The argument ndp is interpreted as follows:
2224     *
2225     *     ndp         resolution
2226     *      :      ...0000 00 00
2227     *     -7         1000 00 00
2228     *     -6          100 00 00
2229     *     -5           10 00 00
2230     *     -4            1 00 00
2231     *     -3            0 10 00
2232     *     -2            0 01 00
2233     *     -1            0 00 10
2234     *      0            0 00 01
2235     *      1            0 00 00.1
2236     *      2            0 00 00.01
2237     *      3            0 00 00.001
2238     *      :            0 00 00.000...
2239     *
2240     * <li> The largest positive useful value for ndp is determined by the
2241     *     size of days, the format of double on the target platform, and
2242     *     the risk of overflowing ihmsf[3].  On a typical platform, for
2243     *     days up to 1.0, the available floating-point precision might
2244     *     correspond to ndp=12.  However, the practical limit is typically
2245     *     ndp=9, set by the capacity of a 32-bit int, or ndp=4 if int is
2246     *     only 16 bits.
2247     *
2248     * <li> The absolute value of days may exceed 1.0.  In cases where it
2249     *     does not, it is up to the caller to test for and handle the
2250     *     case where days is very nearly 1.0 and rounds up to 24 hours,
2251     *     by testing for ihms[0]=24 and setting ihmsf[0-3] to zero.
2252     *</ol>
2253     *@version 2008 May 11
2254     *
2255     *  @since Release 20101201
2256     *
2257     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
2258     */
2259    public static char jauD2tf(final int ndp, final double days, int ihmsf[])
2260     {
2261        int nrs, n;
2262        double rs, rm, rh, a, w, ah, am, as, af;
2263 
2264 
2265     /* Handle sign. */
2266       char sign = (char) ( ( days >= 0.0 ) ? '+' : '-' );
2267 
2268     /* Interval in seconds. */
2269        a = DAYSEC * abs(days);
2270 
2271     /* Pre-round if resolution coarser than 1s (then pretend ndp=1). */
2272        if (ndp < 0) {
2273           nrs = 1;
2274           for (n = 1; n <= -ndp; n++) {
2275               nrs *= (n == 2 || n == 4) ? 6 : 10;
2276           }
2277           rs = (double) nrs;
2278           w = a / rs;
2279           a = rs * dnint(w);
2280        }
2281 
2282     /* Express the unit of each field in resolution units. */
2283        nrs = 1;
2284        for (n = 1; n <= ndp; n++) {
2285           nrs *= 10;
2286        }
2287        rs = (double) nrs;
2288        rm = rs * 60.0;
2289        rh = rm * 60.0;
2290 
2291     /* Round the interval and express in resolution units. */
2292        a = dnint(rs * a);
2293 
2294     /* Break into fields. */
2295        ah = a / rh;
2296        ah = dint(ah);
2297        a -= ah * rh;
2298        am = a / rm;
2299        am = dint(am);
2300        a -= am * rm;
2301        as = a / rs;
2302        as = dint(as);
2303        af = a - as * rs;
2304 
2305     /* Return results. */
2306        ihmsf[0] = (int) ah;
2307        ihmsf[1] = (int) am;
2308        ihmsf[2] = (int) as;
2309        ihmsf[3] = (int) af;
2310 
2311        return sign;
2312 
2313         }
2314  
2315    /**
2316     * Representation of Gregorian Calendar with fractional day.
2317     * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
2318     * 
2319     * @since AIDA Stage 1
2320     */
2321    public static class Calendar {
2322        public final int iy;
2323        public final int im;
2324        public final int id;
2325        public final double fd;
2326        public Calendar (int iy, int im, int id, double fd)
2327        {
2328            this.iy = iy;
2329            this.im = im;
2330            this.id = id;
2331            this.fd = fd;
2332        }
2333    }
2334 
2335    /**
2336     * Representation of Gregorian Calendar with integer hours minutes and seconds.
2337     * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
2338     * 
2339     * @since AIDA Stage 1
2340     */
2341    public static class CalendarHMS {
2342        public final int iy;
2343        public final int im;
2344        public final int id;
2345        public final int ihmsf[];
2346        public CalendarHMS (int iy, int im, int id, int hmsf[]){
2347            this.iy = iy;
2348            this.im = im;
2349            this.id = id;
2350            this.ihmsf = hmsf;
2351        }
2352    }
2353    
2354 /**
2355 **
2356 **  Format for output a 2-part Julian Date (or in the case of UTC a
2357 **  quasi-JD form that includes special provision for leap seconds).
2358 **
2359 **<p>This function is derived from the International Astronomical Union's
2360 **  SOFA (Standards of Fundamental Astronomy) software collection.
2361 **
2362 **<p>Status:  support function.
2363 **
2364 **<!-- Given: -->
2365 **     scale     char[]  time scale ID (Note 1)
2366 **     ndp       int     resolution (Note 2)
2367 **     d1,d2     double  time as a 2-part Julian Date (Notes 3,4)
2368 **
2369 **<!-- Returned:-->
2370 **     iy,im,id  int     year, month, day in Gregorian calendar (Note 5)
2371 **     ihmsf     int[4]  hours, minutes, seconds, fraction (Note 1)
2372 **
2373 **  Returned (function value):
2374 **               int     status: +1 = dubious year (Note 5)
2375 **                                0 = OK
2376 **                               -1 = unacceptable date (Note 6)
2377 **
2378 **<p>Notes:
2379 **
2380 **  1) scale identifies the time scale.  Only the value "UTC" (in upper
2381 **     case) is significant, and enables handling of leap seconds (see
2382 **     Note 4).
2383 **
2384 **  2) ndp is the number of decimal places in the seconds field, and can
2385 **     have negative as well as positive values, such as:
2386 **
2387 **     ndp         resolution
2388 **     -4            1 00 00
2389 **     -3            0 10 00
2390 **     -2            0 01 00
2391 **     -1            0 00 10
2392 **      0            0 00 01
2393 **      1            0 00 00.1
2394 **      2            0 00 00.01
2395 **      3            0 00 00.001
2396 **
2397 **     The limits are platform dependent, but a safe range is -5 to +9.
2398 **
2399 **  3) d1+d2 is Julian Date, apportioned in any convenient way between
2400 **     the two arguments, for example where d1 is the Julian Day Number
2401 **     and d2 is the fraction of a day.  In the case of UTC, where the
2402 **     use of JD is problematical, special conventions apply:  see the
2403 **     next note.
2404 **
2405 **  4) JD cannot unambiguously represent UTC during a leap second unless
2406 **     special measures are taken.  The SOFA internal convention is that
2407 **     the quasi-JD day represents UTC days whether the length is 86399,
2408 **     86400 or 86401 SI seconds.  In the 1960-1972 era there were
2409 **     smaller jumps (in either direction) each time the linear UTC(TAI)
2410 **     expression was changed, and these "mini-leaps" are also included
2411 **     in the SOFA convention.
2412 **
2413 **  5) The warning status "dubious year" flags UTCs that predate the
2414 **     introduction of the time scale or that are too far in the future
2415 **     to be trusted.  See iauDat for further details.
2416 **
2417 **  6) For calendar conventions and limitations, see iauCal2jd.
2418 **
2419 **  Called:
2420 **     iauJd2cal    JD to Gregorian calendar
2421 **     iauD2tf      decompose days to hms
2422 **     iauDat       delta(AT) = TAI-UTC
2423 **
2424 **@version 2014 February 15
2425 **
2426 **@since JSOFA release 20131202
2427 **
2428 **  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
2429  * @throws JSOFAInternalError 
2430  * @throws JSOFAIllegalParameter 
2431 */
2432 public static CalendarHMS jauD2dtf(final String scale, int ndp, double d1, double d2 ) throws JSOFAIllegalParameter, JSOFAInternalError
2433 {
2434  boolean leap;
2435  int iy1, im1, id1, iy2, im2, id2, ihmsf1[] = new int[4];
2436  double a1, b1, fd, dat0, dat12, dat24, dleap;
2437 
2438 
2439 /* The two-part JD. */
2440  a1 = d1;
2441  b1 = d2;
2442 
2443 /* Provisional calendar date. */
2444  Calendar cal = jauJd2cal(a1, b1);
2445  iy1 = cal.iy;
2446  im1 = cal.im;
2447  id1 = cal.id;
2448  fd = cal.fd;
2449 
2450 /* Is this a leap second day? */
2451  leap = false;
2452  if ( scale.equalsIgnoreCase("UTC") ) {
2453 
2454  /* TAI-UTC at 0h today. */
2455      dat0 = jauDat(iy1, im1, id1, 0.0 );
2456 
2457  /* TAI-UTC at 12h today (to detect drift). */
2458      dat12 = jauDat(iy1, im1, id1, 0.5);
2459 
2460  /* TAI-UTC at 0h tomorrow (to detect jumps). */
2461     cal = jauJd2cal(a1+1.5, b1-fd);
2462     iy2 = cal.iy;
2463     im2 = cal.im;
2464     id2 = cal.id;
2465     dat24 = jauDat(iy2, im2, id2, 0.0);
2466 
2467  /* Any sudden change in TAI-UTC (seconds). */
2468     dleap = dat24 - (2.0*dat12 - dat0);
2469 
2470  /* If leap second day, scale the fraction of a day into SI. */
2471     leap = (dleap != 0.0);
2472     if (leap) fd += fd * dleap/DAYSEC;
2473  }
2474 
2475 jauD2tf ( ndp, fd, ihmsf1 );
2476 
2477 /* Has the (rounded) time gone past 24h? */
2478  if ( ihmsf1[0] > 23 ) {
2479 
2480  /* Yes.  We probably need tomorrow's calendar date. */
2481     cal = jauJd2cal(a1+1.5, b1-fd);
2482     iy2 = cal.iy; im2 = cal.im; id2 = cal.id; 
2483     
2484  /* Is today a leap second day? */
2485     if ( ! leap ) {
2486 
2487     /* No.  Use 0h tomorrow. */
2488        iy1 = iy2;
2489        im1 = im2;
2490        id1 = id2;
2491        ihmsf1[0] = 0;
2492        ihmsf1[1] = 0;
2493        ihmsf1[2] = 0;
2494 
2495     } else {
2496 
2497     /* Yes.  Are we past the leap second itself? */
2498        if ( ihmsf1[2] > 0 ) {
2499 
2500        /* Yes.  Use tomorrow but allow for the leap second. */
2501           iy1 = iy2;
2502           im1 = im2;
2503           id1 = id2;
2504           ihmsf1[0] = 0;
2505           ihmsf1[1] = 0;
2506           ihmsf1[2] = 0;
2507 
2508        } else {
2509 
2510        /* No.  Use 23 59 60... today. */
2511           ihmsf1[0] = 23;
2512           ihmsf1[1] = 59;
2513           ihmsf1[2] = 60;
2514        }
2515 
2516     /* If rounding to 10s or coarser always go up to new day. */
2517        if ( ndp < 0 && ihmsf1[2] == 60 ) {
2518           iy1 = iy2;
2519           im1 = im2;
2520           id1 = id2;
2521           ihmsf1[0] = 0;
2522           ihmsf1[1] = 0;
2523           ihmsf1[2] = 0;
2524        }
2525     }
2526  }
2527 
2528 /* Results. */
2529  
2530  return new CalendarHMS(iy1, im1, id1, ihmsf1);
2531 
2532 }   
2533 
2534 /**
2535 **  Encode date and time fields into 2-part Julian Date (or in the case
2536 **  of UTC a quasi-JD form that includes special provision for leap
2537 **  seconds).
2538 **
2539 **<p>This function is derived from the International Astronomical Union's
2540 **  SOFA (Standards of Fundamental Astronomy) software collection.
2541 **
2542 **  Status:  support function.
2543 **
2544 **  Given:
2545 **    @param scale     char  time scale ID (Note 1)
2546 **    @param iy,im,id  int     year, month, day in Gregorian calendar (Note 2)
2547 **    @param ihr,imn   int     hour, minute
2548 **    @param sec       double  seconds
2549 **
2550 **  Returned:
2551 **     @return     2-part Julian Date (Notes 3,4)
2552 **
2553  * @throws JSOFAIllegalParameter 
2554  * @throws JSOFAInternalError 
2555 **          {@literal    status: +3 = both of next two
2556 **                               +2 = time is after end of day (Note 5)
2557 **                               +1 = dubious year (Note 6)
2558 **                                0 = OK
2559 **                               -1 = bad year
2560 **                               -2 = bad month
2561 **                               -3 = bad day
2562 **                               -4 = bad hour
2563 **                               -5 = bad minute
2564 **                               -6 = bad second (<0)}
2565 **
2566 **<p>Notes:
2567 **
2568 **  1) scale identifies the time scale.  Only the value "UTC" (in upper
2569 **     case) is significant, and enables handling of leap seconds (see
2570 **     Note 4).
2571 **
2572 **  2) For calendar conventions and limitations, see iauCal2jd.
2573 **
2574 **  3) The sum of the results, d1+d2, is Julian Date, where normally d1
2575 **     is the Julian Day Number and d2 is the fraction of a day.  In the
2576 **     case of UTC, where the use of JD is problematical, special
2577 **     conventions apply:  see the next note.
2578 **
2579 **  4) JD cannot unambiguously represent UTC during a leap second unless
2580 **     special measures are taken.  The SOFA internal convention is that
2581 **     the quasi-JD day represents UTC days whether the length is 86399,
2582 **     86400 or 86401 SI seconds.  In the 1960-1972 era there were
2583 **     smaller jumps (in either direction) each time the linear UTC(TAI)
2584 **     expression was changed, and these "mini-leaps" are also included
2585 **     in the SOFA convention.
2586 **
2587 **  5) The warning status "time is after end of day" usually means that
2588 **     the sec argument is greater than 60.0.  However, in a day ending
2589 **     in a leap second the limit changes to 61.0 (or 59.0 in the case
2590 **     of a negative leap second).
2591 **
2592 **  6) The warning status "dubious year" flags UTCs that predate the
2593 **     introduction of the time scale or that are too far in the future
2594 **     to be trusted.  See iauDat for further details.
2595 **
2596 **  7) Only in the case of continuous and regular time scales (TAI, TT,
2597 **     TCG, TCB and TDB) is the result d1+d2 a Julian Date, strictly
2598 **     speaking.  In the other cases (UT1 and UTC) the result must be
2599 **     used with circumspection;  in particular the difference between
2600 **     two such results cannot be interpreted as a precise time
2601 **     interval.
2602 **
2603 **  Called:
2604 **     iauCal2jd    Gregorian calendar to JD
2605 **     iauDat       delta(AT) = TAI-UTC
2606 **     iauJd2cal    JD to Gregorian calendar
2607 **
2608 **@version 2013 July 26
2609 **
2610 **@since JSOFA release 20131202
2611 **
2612 **  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
2613 */
2614 public static JulianDate jauDtf2d(final String scale, int iy, int im, int id,
2615         int ihr, int imn, double sec) throws JSOFAIllegalParameter, JSOFAInternalError
2616 {
2617 int js = 0, iy2, im2, id2;
2618 double dj, w, day, seclim, dat0, dat12, dat24, dleap, time;
2619 
2620 
2621 /* Today's Julian Day Number. */
2622 JulianDate jd = jauCal2jd(iy, im, id);
2623 dj = jd.djm0; w = jd.djm1;
2624 dj += w;
2625 
2626 /* Day length and final minute length in seconds (provisional). */
2627 day = DAYSEC;
2628 seclim = 60.0;
2629 
2630 /* Deal with the UTC leap second case. */
2631 if (  scale.equals("UTC") ) {
2632 
2633 /* TAI-UTC at 0h today. */
2634     dat0 = jauDat(iy, im, id, 0.0);
2635 
2636 /* TAI-UTC at 12h today (to detect drift). */
2637     dat12 = jauDat(iy, im, id, 0.5);
2638 
2639 /* TAI-UTC at 0h tomorrow (to detect jumps). */
2640  Calendar cal = jauJd2cal ( dj, 1.5);
2641  iy2 = cal.iy; im2 = cal.im; id2 = cal.id; w = cal.fd;
2642  
2643  dat24 = jauDat(iy2, im2, id2, 0.0);
2644 
2645 /* Any sudden change in TAI-UTC between today and tomorrow. */
2646  dleap = dat24 - (2.0*dat12 - dat0);
2647 
2648 /* If leap second day, correct the day and final minute lengths. */
2649  day += dleap;
2650  if ( ihr == 23 && imn == 59 ) seclim += dleap;
2651 
2652 /* End of UTC-specific actions. */
2653 }
2654 
2655 /* Validate the time. */
2656 if ( ihr >= 0 && ihr <= 23 ) {
2657  if ( imn >= 0 && imn <= 59 ) {
2658     if ( sec >= 0 ) {
2659        if ( sec >= seclim ) {
2660           js += 2;
2661        }
2662     } else {
2663        js = -6;
2664     }
2665  } else {
2666     js = -5;
2667  }
2668 } else {
2669  js = -4;
2670 }
2671 if ( js < 0 ) throw new JSOFAInternalError("problem with time", js);
2672 
2673 /* The time in days. */
2674 time  = ( 60.0 * ( (double) ( 60 * ihr + imn ) ) + sec ) / day;
2675 
2676 /* Return the date and time. */
2677 return new JulianDate(dj, time) ;
2678 
2679 }
2680 
2681 
2682  
2683 /** Release year for this version of jauDat {@value} */
2684 public final static int IYV = 2016;
2685 static class LeapInfo {
2686     final public int iyear, month;
2687     final public double delat;
2688     public LeapInfo(int i, int m, double t) {
2689        iyear = i;
2690        month = m;
2691        delat = t;
2692     }
2693  }
2694 
2695 /* Dates and Delta(AT)s */
2696   static final LeapInfo leapSeconds[] = {
2697      new LeapInfo( 1960,  1,  1.4178180 ),
2698      new LeapInfo( 1961,  1,  1.4228180 ),
2699      new LeapInfo( 1961,  8,  1.3728180 ),
2700      new LeapInfo( 1962,  1,  1.8458580 ),
2701      new LeapInfo( 1963, 11,  1.9458580 ),
2702      new LeapInfo( 1964,  1,  3.2401300 ),
2703      new LeapInfo( 1964,  4,  3.3401300 ),
2704      new LeapInfo( 1964,  9,  3.4401300 ),
2705      new LeapInfo( 1965,  1,  3.5401300 ),
2706      new LeapInfo( 1965,  3,  3.6401300 ),
2707      new LeapInfo( 1965,  7,  3.7401300 ),
2708      new LeapInfo( 1965,  9,  3.8401300 ),
2709      new LeapInfo( 1966,  1,  4.3131700 ),
2710      new LeapInfo( 1968,  2,  4.2131700 ),
2711      new LeapInfo( 1972,  1, 10.0       ),
2712      new LeapInfo( 1972,  7, 11.0       ),
2713      new LeapInfo( 1973,  1, 12.0       ),
2714      new LeapInfo( 1974,  1, 13.0       ),
2715      new LeapInfo( 1975,  1, 14.0       ),
2716      new LeapInfo( 1976,  1, 15.0       ),
2717      new LeapInfo( 1977,  1, 16.0       ),
2718      new LeapInfo( 1978,  1, 17.0       ),
2719      new LeapInfo( 1979,  1, 18.0       ),
2720      new LeapInfo( 1980,  1, 19.0       ),
2721      new LeapInfo( 1981,  7, 20.0       ),
2722      new LeapInfo( 1982,  7, 21.0       ),
2723      new LeapInfo( 1983,  7, 22.0       ),
2724      new LeapInfo( 1985,  7, 23.0       ),
2725      new LeapInfo( 1988,  1, 24.0       ),
2726      new LeapInfo( 1990,  1, 25.0       ),
2727      new LeapInfo( 1991,  1, 26.0       ),
2728      new LeapInfo( 1992,  7, 27.0       ),
2729      new LeapInfo( 1993,  7, 28.0       ),
2730      new LeapInfo( 1994,  7, 29.0       ),
2731      new LeapInfo( 1996,  1, 30.0       ),
2732      new LeapInfo( 1997,  7, 31.0       ),
2733      new LeapInfo( 1999,  1, 32.0       ),
2734      new LeapInfo( 2006,  1, 33.0       ),
2735      new LeapInfo( 2009,  1, 34.0       ),
2736      new LeapInfo( 2012,  7, 35.0       ),
2737      new LeapInfo( 2015,  7, 36.0       ),
2738      new LeapInfo( 2017,  1, 37.0       )
2739   };
2740 
2741     /**
2742     *  For a given UTC date, calculate delta(AT) = TAI-UTC.
2743     *<pre>
2744     *     :------------------------------------------:
2745     *     :                                          :
2746     *     :                 IMPORTANT                :
2747     *     :                                          :
2748     *     :  A new version of this function must be  :
2749     *     :  produced whenever a new leap second is  :
2750     *     :  announced.  There are four items to     :
2751     *     :  change on each such occasion:           :
2752     *     :                                          :
2753     *     :  1) A new line must be added to the set  :
2754     *     :     of statements that initialize the    :
2755     *     :     array "changes".                     :
2756     *     :                                          :
2757     *     :  2) The parameter IYV must be set to     :
2758     *     :     the current year.                    :
2759     *     :                                          :
2760     *     :  3) The "Latest leap second" comment     :
2761     *     :     below must be set to the new leap    :
2762     *     :     second date.                         :
2763     *     :                                          :
2764     *     :  4) The "This revision" comment, later,  :
2765     *     :     must be set to the current date.     :
2766     *     :                                          :
2767     *     :  Change (2) must also be carried out     :
2768     *     :  whenever the function is re-issued,     :
2769     *     :  even if no leap seconds have been       :
2770     *     :  added.                                  :
2771     *     :                                          :
2772     *     :  Latest leap second:  2017 Jan 01        :
2773     *     :                                          :
2774     *     :__________________________________________:
2775     *</pre>
2776     *<p>This function is derived from the International Astronomical Union's
2777     *  SOFA (Standards Of Fundamental Astronomy) software collection.
2778     *
2779     *<p>Status:  support function.
2780     *
2781     *<!-- Given: -->
2782     *     @param iy      int       UTC:  year (Notes 1 and 2)
2783     *     @param im      int             month (Note 2)
2784     *     @param id      int             day (Notes 2 and 3)
2785     *     @param fd      double          fraction of day (Note 4)
2786     *
2787     *<!-- Returned: -->
2788     *     @return deltat  double     <u>returned</u> TAI minus UTC, seconds
2789     *
2790     *  @throws     JSOFAIllegalParameter   status (Note 5):
2791     *                       1 = dubious year (Note 1)
2792     *                       0 = OK
2793     *                      -1 = bad year
2794     *                      -2 = bad month
2795     *                      -3 = bad day (Note 3)
2796     *                      -4 = bad fraction (Note 4)
2797     *
2798     * <p>Notes:
2799     * <ol>
2800     *
2801     * <li> UTC began at 1960 January 1.0 (JD 2436934.5) and it is improper
2802     *     to call the function with an earlier date.  If this is attempted,
2803     *     zero is returned together with a warning status.
2804     *
2805     *     Because leap seconds cannot, in principle, be predicted in
2806     *     advance, a reliable check for dates beyond the valid range is
2807     *     impossible.  To guard against gross errors, a year five or more
2808     *     after the release year of the present function (see parameter
2809     *     IYV) is considered dubious.  In this case a warning status is
2810     *     returned but the result is computed in the normal way.
2811     *
2812     *     For both too-early and too-late years, the warning status is
2813     *     j=+1.  This is distinct from the error status j=-1, which
2814     *     signifies a year so early that JD could not be computed.
2815     *
2816     * <li> If the specified date is for a day which ends with a leap second,
2817     *     the UTC-TAI value returned is for the period leading up to the
2818     *     leap second.  If the date is for a day which begins as a leap
2819     *     second ends, the UTC-TAI returned is for the period following the
2820     *     leap second.
2821     *
2822     * <li> The day number must be in the normal calendar range, for example
2823     *     1 through 30 for April.  The "almanac" convention of allowing
2824     *     such dates as January 0 and December 32 is not supported in this
2825     *     function, in order to avoid confusion near leap seconds.
2826     *
2827     * <li> The fraction of day is used only for dates before the
2828     *     introduction of leap seconds, the first of which occurred at the
2829     *     end of 1971.  It is tested for validity (zero to less than 1 is
2830     *     the valid range) even if not used;  if invalid, zero is used and
2831     *     status j=-4 is returned.  For many applications, setting fd to
2832     *     zero is acceptable;  the resulting error is always less than 3 ms
2833     *     (and occurs only pre-1972).
2834     *
2835     * <li> The status value returned in the case where there are multiple
2836     *     errors refers to the first error detected.  For example, if the
2837     *     month and day are 13 and 32 respectively, j=-2 (bad month)
2838     *     will be returned.
2839     *
2840     * <li> In cases where a valid result is not available, zero is returned.
2841     *
2842     *<p>References:
2843     *
2844     * <li> For dates from 1961 January 1 onwards, the expressions from the
2845     *     file ftp://maia.usno.navy.mil/ser7/tai-utc.dat are used.
2846     *
2847     * <li> The 5ms timestep at 1961 January 1 is taken from 2.58.1 (p87) of
2848     *     the 1992 Explanatory Supplement.
2849     *</ol>
2850     *<p>Called:<ul>
2851     *     <li>{@link #jauCal2jd} Gregorian calendar to Julian Day number
2852     * </ul>
2853     *<p>@version 20160729
2854     *
2855     *  @since Release 20101201
2856     *
2857     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
2858     */
2859     public static double jauDat(int iy, int im, int id, double fd ) throws JSOFAIllegalParameter, JSOFAInternalError
2860     {
2861 
2862     /* Reference dates (MJD) and drift rates (s/day), pre leap seconds */
2863       final double drift[][] = {
2864           { 37300.0, 0.0012960 },
2865           { 37300.0, 0.0012960 },
2866           { 37300.0, 0.0012960 },
2867           { 37665.0, 0.0011232 },
2868           { 37665.0, 0.0011232 },
2869           { 38761.0, 0.0012960 },
2870           { 38761.0, 0.0012960 },
2871           { 38761.0, 0.0012960 },
2872           { 38761.0, 0.0012960 },
2873           { 38761.0, 0.0012960 },
2874           { 38761.0, 0.0012960 },
2875           { 38761.0, 0.0012960 },
2876           { 39126.0, 0.0025920 },
2877           { 39126.0, 0.0025920 }
2878        };
2879 
2880     /* Number of Delta(AT) expressions before leap seconds were introduced */
2881     final int NERA1 = drift.length;
2882 
2883 
2884     /* Number of Delta(AT) changes */
2885        final int NDAT = leapSeconds.length;
2886 
2887     /* Miscellaneous local variables */
2888        int i, m;
2889        double da, djm;
2890 
2891 
2892     /* Initialize the result to zero. */
2893        double deltat = da = 0.0;
2894 
2895     /* If invalid fraction of a day, set error status and give up. */
2896        if (fd < 0.0 || fd > 1.0) throw new JSOFAIllegalParameter("bad day fraction", -4);
2897 
2898     /* Convert the date into an MJD. */
2899        JulianDate jd = jauCal2jd(iy, im, id);
2900        djm = jd.djm1;
2901 
2902     /* If pre-UTC year, set warning status and give up. */
2903        if (iy < leapSeconds[0].iyear) throw new JSOFAInternalError("year before UTC start", 1);
2904 
2905     /* If suspiciously late year, set warning status but proceed. */
2906        if (iy > IYV + 5) {
2907     }
2908 
2909     /* Combine year and month to form a date-ordered integer... */
2910        m = 12*iy + im;
2911 
2912     /* ...and use it to find the preceding table entry. */
2913        for (i = NDAT-1; i >=0; i--) {
2914           if (m >= (12 * leapSeconds[i].iyear + leapSeconds[i].month)) break;
2915        }
2916 
2917     /* Get the Delta(AT). */
2918        da = leapSeconds[i].delat;
2919 
2920     /* If pre-1972, adjust for drift. */
2921        if (i < NERA1) da += (djm + fd - drift[i][0]) * drift[i][1];
2922 
2923     /* Return the Delta(AT) value. */
2924        deltat = da;
2925 
2926     /* Return the value. */
2927        return deltat;
2928 
2929         }
2930     
2931 
2932     /**
2933     *  An approximation to TDB-TT, the difference between barycentric
2934     *  dynamical time and terrestrial time, for an observer on the Earth.
2935     *
2936     *  The different time scales - proper, coordinate and realized - are
2937     *  related to each other:
2938     *  {@code
2939     *            TAI             <-  physically realized
2940     *             :
2941     *          offset            <-  observed (nominally +32.184s)
2942     *             :
2943     *            TT              <-  terrestrial time
2944     *             :
2945     *    rate adjustment (L_G)   <-  definition of TT
2946     *             :
2947     *            TCG             <-  time scale for GCRS
2948     *             :
2949     *      "periodic" terms      <-  jauDtdb  is an implementation
2950     *             :
2951     *    rate adjustment (L_C)   <-  function of solar-system ephemeris
2952     *             :
2953     *            TCB             <-  time scale for BCRS
2954     *             :
2955     *    rate adjustment (-L_B)  <-  definition of TDB
2956     *             :
2957     *            TDB             <-  TCB scaled to track TT
2958     *             :
2959     *      "periodic" terms      <-  -jau_DTDB is an approximation
2960     *             :
2961     *            TT              <-  terrestrial time
2962     *}
2963     *  Adopted values for the various constants can be found in the IERS
2964     *  Conventions (McCarthy &amp; Petit 2003).
2965     *
2966     *<p>This function is derived from the International Astronomical Union's
2967     *  SOFA (Standards Of Fundamental Astronomy) software collection.
2968     *
2969     *<p>Status:  canonical model.
2970     *
2971     *<!-- Given: -->
2972     *     @param date1 double   date, TDB (Notes 1-3)
2973     *     @param date2 double   date, TDB (Notes 1-3) 
2974     *     @param ut             double   universal time (UT1, fraction of one day)
2975     *     @param elong          double   longitude (east positive, radians)
2976     *     @param u              double   distance from Earth spin axis (km)
2977     *     @param v              double   distance north of equatorial plane (km)
2978     *
2979     * <!-- Returned (function value): -->
2980     *  @return @return             double  TDB-TT (seconds)
2981     *
2982     * <p>Notes:
2983     * <ol>
2984     *
2985     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
2986     *     convenient way between the two arguments.  For example,
2987     *     JD(TT)=2450123.7 could be expressed in any of these ways,
2988     *     among others:
2989     *<pre>
2990     *            date1          date2
2991     *
2992     *         2450123.7           0.0       (JD method)
2993     *         2451545.0       -1421.3       (J2000 method)
2994     *         2400000.5       50123.2       (MJD method)
2995     *         2450123.5           0.2       (date &amp; time method)
2996     *</pre>
2997     *     The JD method is the most natural and convenient to use in
2998     *     cases where the loss of several decimal digits of resolution
2999     *     is acceptable.  The J2000 method is best matched to the way
3000     *     the argument is handled internally and will deliver the
3001     *     optimum resolution.  The MJD method and the date &amp; time methods
3002     *     are both good compromises between resolution and convenience.
3003     *
3004     *     Although the date is, formally, barycentric dynamical time (TDB),
3005     *     the terrestrial dynamical time (TT) can be used with no practical
3006     *     effect on the accuracy of the prediction.
3007     *
3008     * <li> TT can be regarded as a coordinate time that is realized as an
3009     *     offset of 32.184s from International Atomic Time, TAI.  TT is a
3010     *     specific linear transformation of geocentric coordinate time TCG,
3011     *     which is the time scale for the Geocentric Celestial Reference
3012     *     System, GCRS.
3013     *
3014     * <li> TDB is a coordinate time, and is a specific linear transformation
3015     *     of barycentric coordinate time TCB, which is the time scale for
3016     *     the Barycentric Celestial Reference System, BCRS.
3017     *
3018     * <li> The difference TCG-TCB depends on the masses and positions of the
3019     *     bodies of the solar system and the velocity of the Earth.  It is
3020     *     dominated by a rate difference, the residual being of a periodic
3021     *     character.  The latter, which is modeled by the present function,
3022     *     comprises a main (annual) sinusoidal term of amplitude
3023     *     approximately 0.00166 seconds, plus planetary terms up to about
3024     *     20 microseconds, and lunar and diurnal terms up to 2 microseconds.
3025     *     These effects come from the changing transverse Doppler effect
3026     *     and gravitational red-shift as the observer (on the Earth's
3027     *     surface) experiences variations in speed (with respect to the
3028     *     BCRS) and gravitational potential.
3029     *
3030     * <li> TDB can be regarded as the same as TCB but with a rate adjustment
3031     *     to keep it close to TT, which is convenient for many applications.
3032     *     The history of successive attempts to define TDB is set out in
3033     *     Resolution 3 adopted by the IAU General Assembly in 2006, which
3034     *     defines a fixed TDB(TCB) transformation that is consistent with
3035     *     contemporary solar-system ephemerides.  Future ephemerides will
3036     *     imply slightly changed transformations between TCG and TCB, which
3037     *     could introduce a linear drift between TDB and TT;  however, any
3038     *     such drift is unlikely to exceed 1 nanosecond per century.
3039     *
3040     * <li> The geocentric TDB-TT model used in the present function is that of
3041     *     Fairhead &amp; Bretagnon (1990), in its full form.  It was originally
3042     *     supplied by Fairhead (private communications with P.T.Wallace,
3043     *     1990) as a Fortran subroutine.  The present C function contains an
3044     *     adaptation of the Fairhead code.  The numerical results are
3045     *     essentially unaffected by the changes, the differences with
3046     *     respect to the Fairhead &amp; Bretagnon original being at the 1e-20 s
3047     *     level.
3048     *
3049     *     The topocentric part of the model is from Moyer (1981) and
3050     *     Murray (1983), with fundamental arguments adapted from
3051     *     Simon et al. 1994.  It is an approximation to the expression
3052     *     ( v / c ) . ( r / c ), where v is the barycentric velocity of
3053     *     the Earth, r is the geocentric position of the observer and
3054     *     c is the speed of light.
3055     *
3056     *     By supplying zeroes for u and v, the topocentric part of the
3057     *     model can be nullified, and the function will return the Fairhead
3058     *     &amp; Bretagnon result alone.
3059     *
3060     * <li> During the interval 1950-2050, the absolute accuracy is better
3061     *     than +/- 3 nanoseconds relative to time ephemerides obtained by
3062     *     direct numerical integrations based on the JPL DE405 solar system
3063     *     ephemeris.
3064     *
3065     * <li> It must be stressed that the present function is merely a model,
3066     *     and that numerical integration of solar-system ephemerides is the
3067     *     definitive method for predicting the relationship between TCG and
3068     *     TCB and hence between TT and TDB.
3069     *</ol>
3070     *<p>References:
3071     *
3072     *     <p>Fairhead, L., &amp; Bretagnon, P., Astron.Astrophys., 229, 240-247
3073     *     (1990).
3074     *
3075     *     <p>IAU 2006 Resolution 3.
3076     *
3077     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
3078     *     IERS Technical Note No. 32, BKG (2004)
3079     *
3080     *     <p>Moyer, T.D., Cel.Mech., 23, 33 (1981).
3081     *
3082     *     <p>Murray, C.A., Vectorial Astrometry, Adam Hilger (1983).
3083     *
3084     *     <p>Seidelmann, P.K. et al., Explanatory Supplement to the
3085     *     Astronomical Almanac, Chapter 2, University Science Books (1992).
3086     *
3087     *     <p>Simon, J.L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
3088     *     Francou, G. &amp; Laskar, J., Astron.Astrophys., 282, 663-683 (1994).
3089     *
3090     *@version 2009 December 17
3091     *
3092     *  @since Release 20101201
3093     *
3094     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
3095     */
3096     public static  double jauDtdb(double date1, double date2,
3097                    double ut, double elong, double u, double v)
3098     {
3099        double t, tsol, w, elsun, emsun, d, elj, els, wt, w0, w1, w2, w3, w4,
3100               wf, wj;
3101        int j;
3102 
3103     /*
3104     * =====================
3105     * Fairhead et al. model
3106     * =====================
3107     *
3108     * 787 sets of three coefficients.
3109     *
3110     * Each set is
3111     *    amplitude (microseconds)
3112     *      frequency (radians per Julian millennium since J2000.0)
3113     *      phase (radians)
3114     *
3115     * Sets   1-474 are the T**0 terms
3116     *  "   475-679  "   "  T**1
3117     *  "   680-764  "   "  T**2
3118     *  "   765-784  "   "  T**3
3119     *  "   785-787  "   "  T**4
3120     */
3121 
3122        final double fairhd[][] = {
3123        /* 1, 10 */
3124           { 1656.674564e-6,     6283.075849991,  6.240054195 },
3125           {   22.417471e-6,     5753.384884897,  4.296977442 },
3126           {   13.839792e-6,    12566.151699983,  6.196904410 },
3127           {    4.770086e-6,      529.690965095,  0.444401603 },
3128           {    4.676740e-6,     6069.776754553,  4.021195093 },
3129           {    2.256707e-6,      213.299095438,  5.543113262 },
3130           {    1.694205e-6,      -3.523118349,   5.025132748 },
3131           {    1.554905e-6,    77713.771467920,  5.198467090 },
3132           {    1.276839e-6,     7860.419392439,  5.988822341 },
3133           {    1.193379e-6,     5223.693919802,  3.649823730 },
3134        /* 11, 20 */
3135           {    1.115322e-6,     3930.209696220,  1.422745069 },
3136           {    0.794185e-6,    11506.769769794,  2.322313077 },
3137           {    0.447061e-6,       26.298319800,  3.615796498 },
3138           {    0.435206e-6,     -398.149003408,  4.349338347 },
3139           {    0.600309e-6,     1577.343542448,  2.678271909 },
3140           {    0.496817e-6,     6208.294251424,  5.696701824 },
3141           {    0.486306e-6,     5884.926846583,  0.520007179 },
3142           {    0.432392e-6,       74.781598567,  2.435898309 },
3143           {    0.468597e-6,     6244.942814354,  5.866398759 },
3144           {    0.375510e-6,     5507.553238667,  4.103476804 },
3145        /* 21, 30 */
3146           {    0.243085e-6,     -775.522611324,  3.651837925 },
3147           {    0.173435e-6,    18849.227549974,  6.153743485 },
3148           {    0.230685e-6,     5856.477659115,  4.773852582 },
3149           {    0.203747e-6,    12036.460734888,  4.333987818 },
3150           {    0.143935e-6,     -796.298006816,  5.957517795 },
3151           {    0.159080e-6,    10977.078804699,  1.890075226 },
3152           {    0.119979e-6,       38.133035638,  4.551585768 },
3153           {    0.118971e-6,     5486.777843175,  1.914547226 },
3154           {    0.116120e-6,     1059.381930189,  0.873504123 },
3155           {    0.137927e-6,    11790.629088659,  1.135934669 },
3156        /* 31, 40 */
3157           {    0.098358e-6,     2544.314419883,  0.092793886 },
3158           {    0.101868e-6,    -5573.142801634,  5.984503847 },
3159           {    0.080164e-6,      206.185548437,  2.095377709 },
3160           {    0.079645e-6,     4694.002954708,  2.949233637 },
3161           {    0.062617e-6,       20.775395492,  2.654394814 },
3162           {    0.075019e-6,     2942.463423292,  4.980931759 },
3163           {    0.064397e-6,     5746.271337896,  1.280308748 },
3164           {    0.063814e-6,     5760.498431898,  4.167901731 },
3165           {    0.048042e-6,     2146.165416475,  1.495846011 },
3166           {    0.048373e-6,      155.420399434,  2.251573730 },
3167        /* 41, 50 */
3168           {    0.058844e-6,      426.598190876,  4.839650148 },
3169           {    0.046551e-6,       -0.980321068,  0.921573539 },
3170           {    0.054139e-6,    17260.154654690,  3.411091093 },
3171           {    0.042411e-6,     6275.962302991,  2.869567043 },
3172           {    0.040184e-6,       -7.113547001,  3.565975565 },
3173           {    0.036564e-6,     5088.628839767,  3.324679049 },
3174           {    0.040759e-6,    12352.852604545,  3.981496998 },
3175           {    0.036507e-6,      801.820931124,  6.248866009 },
3176           {    0.036955e-6,     3154.687084896,  5.071801441 },
3177           {    0.042732e-6,      632.783739313,  5.720622217 },
3178        /* 51, 60 */
3179           {    0.042560e-6,   161000.685737473,  1.270837679 },
3180           {    0.040480e-6,    15720.838784878,  2.546610123 },
3181           {    0.028244e-6,    -6286.598968340,  5.069663519 },
3182           {    0.033477e-6,     6062.663207553,  4.144987272 },
3183           {    0.034867e-6,      522.577418094,  5.210064075 },
3184           {    0.032438e-6,     6076.890301554,  0.749317412 },
3185           {    0.030215e-6,     7084.896781115,  3.389610345 },
3186           {    0.029247e-6,   -71430.695617928,  4.183178762 },
3187           {    0.033529e-6,     9437.762934887,  2.404714239 },
3188           {    0.032423e-6,     8827.390269875,  5.541473556 },
3189        /* 61, 70 */
3190           {    0.027567e-6,     6279.552731642,  5.040846034 },
3191           {    0.029862e-6,    12139.553509107,  1.770181024 },
3192           {    0.022509e-6,    10447.387839604,  1.460726241 },
3193           {    0.020937e-6,     8429.241266467,  0.652303414 },
3194           {    0.020322e-6,      419.484643875,  3.735430632 },
3195           {    0.024816e-6,    -1194.447010225,  1.087136918 },
3196           {    0.025196e-6,     1748.016413067,  2.901883301 },
3197           {    0.021691e-6,    14143.495242431,  5.952658009 },
3198           {    0.017673e-6,     6812.766815086,  3.186129845 },
3199           {    0.022567e-6,     6133.512652857,  3.307984806 },
3200        /* 71, 80 */
3201           {    0.016155e-6,    10213.285546211,  1.331103168 },
3202           {    0.014751e-6,     1349.867409659,  4.308933301 },
3203           {    0.015949e-6,     -220.412642439,  4.005298270 },
3204           {    0.015974e-6,    -2352.866153772,  6.145309371 },
3205           {    0.014223e-6,    17789.845619785,  2.104551349 },
3206           {    0.017806e-6,       73.297125859,  3.475975097 },
3207           {    0.013671e-6,     -536.804512095,  5.971672571 },
3208           {    0.011942e-6,     8031.092263058,  2.053414715 },
3209           {    0.014318e-6,    16730.463689596,  3.016058075 },
3210           {    0.012462e-6,      103.092774219,  1.737438797 },
3211        /* 81, 90 */
3212           {    0.010962e-6,        3.590428652,  2.196567739 },
3213           {    0.015078e-6,    19651.048481098,  3.969480770 },
3214           {    0.010396e-6,      951.718406251,  5.717799605 },
3215           {    0.011707e-6,    -4705.732307544,  2.654125618 },
3216           {    0.010453e-6,     5863.591206116,  1.913704550 },
3217           {    0.012420e-6,     4690.479836359,  4.734090399 },
3218           {    0.011847e-6,     5643.178563677,  5.489005403 },
3219           {    0.008610e-6,     3340.612426700,  3.661698944 },
3220           {    0.011622e-6,     5120.601145584,  4.863931876 },
3221           {    0.010825e-6,      553.569402842,  0.842715011 },
3222        /* 91, 100 */
3223           {    0.008666e-6,     -135.065080035,  3.293406547 },
3224           {    0.009963e-6,      149.563197135,  4.870690598 },
3225           {    0.009858e-6,     6309.374169791,  1.061816410 },
3226           {    0.007959e-6,      316.391869657,  2.465042647 },
3227           {    0.010099e-6,      283.859318865,  1.942176992 },
3228           {    0.007147e-6,     -242.728603974,  3.661486981 },
3229           {    0.007505e-6,     5230.807466803,  4.920937029 },
3230           {    0.008323e-6,    11769.853693166,  1.229392026 },
3231           {    0.007490e-6,    -6256.777530192,  3.658444681 },
3232           {    0.009370e-6,   149854.400134205,  0.673880395 },
3233        /* 101, 110 */
3234           {    0.007117e-6,       38.027672636,  5.294249518 },
3235           {    0.007857e-6,    12168.002696575,  0.525733528 },
3236           {    0.007019e-6,     6206.809778716,  0.837688810 },
3237           {    0.006056e-6,      955.599741609,  4.194535082 },
3238           {    0.008107e-6,    13367.972631107,  3.793235253 },
3239           {    0.006731e-6,     5650.292110678,  5.639906583 },
3240           {    0.007332e-6,       36.648562930,  0.114858677 },
3241           {    0.006366e-6,     4164.311989613,  2.262081818 },
3242           {    0.006858e-6,     5216.580372801,  0.642063318 },
3243           {    0.006919e-6,     6681.224853400,  6.018501522 },
3244        /* 111, 120 */
3245           {    0.006826e-6,     7632.943259650,  3.458654112 },
3246           {    0.005308e-6,    -1592.596013633,  2.500382359 },
3247           {    0.005096e-6,    11371.704689758,  2.547107806 },
3248           {    0.004841e-6,     5333.900241022,  0.437078094 },
3249           {    0.005582e-6,     5966.683980335,  2.246174308 },
3250           {    0.006304e-6,    11926.254413669,  2.512929171 },
3251           {    0.006603e-6,    23581.258177318,  5.393136889 },
3252           {    0.005123e-6,       -1.484472708,  2.999641028 },
3253           {    0.004648e-6,     1589.072895284,  1.275847090 },
3254           {    0.005119e-6,     6438.496249426,  1.486539246 },
3255        /* 121, 130 */
3256           {    0.004521e-6,     4292.330832950,  6.140635794 },
3257           {    0.005680e-6,    23013.539539587,  4.557814849 },
3258           {    0.005488e-6,       -3.455808046,  0.090675389 },
3259           {    0.004193e-6,     7234.794256242,  4.869091389 },
3260           {    0.003742e-6,     7238.675591600,  4.691976180 },
3261           {    0.004148e-6,     -110.206321219,  3.016173439 },
3262           {    0.004553e-6,    11499.656222793,  5.554998314 },
3263           {    0.004892e-6,     5436.993015240,  1.475415597 },
3264           {    0.004044e-6,     4732.030627343,  1.398784824 },
3265           {    0.004164e-6,    12491.370101415,  5.650931916 },
3266        /* 131, 140 */
3267           {    0.004349e-6,    11513.883316794,  2.181745369 },
3268           {    0.003919e-6,    12528.018664345,  5.823319737 },
3269           {    0.003129e-6,     6836.645252834,  0.003844094 },
3270           {    0.004080e-6,    -7058.598461315,  3.690360123 },
3271           {    0.003270e-6,       76.266071276,  1.517189902 },
3272           {    0.002954e-6,     6283.143160294,  4.447203799 },
3273           {    0.002872e-6,       28.449187468,  1.158692983 },
3274           {    0.002881e-6,      735.876513532,  0.349250250 },
3275           {    0.003279e-6,     5849.364112115,  4.893384368 },
3276           {    0.003625e-6,     6209.778724132,  1.473760578 },
3277        /* 141, 150 */
3278           {    0.003074e-6,      949.175608970,  5.185878737 },
3279           {    0.002775e-6,     9917.696874510,  1.030026325 },
3280           {    0.002646e-6,    10973.555686350,  3.918259169 },
3281           {    0.002575e-6,    25132.303399966,  6.109659023 },
3282           {    0.003500e-6,      263.083923373,  1.892100742 },
3283           {    0.002740e-6,    18319.536584880,  4.320519510 },
3284           {    0.002464e-6,      202.253395174,  4.698203059 },
3285           {    0.002409e-6,        2.542797281,  5.325009315 },
3286           {    0.003354e-6,   -90955.551694697,  1.942656623 },
3287           {    0.002296e-6,     6496.374945429,  5.061810696 },
3288        /* 151, 160 */
3289           {    0.003002e-6,     6172.869528772,  2.797822767 },
3290           {    0.003202e-6,    27511.467873537,  0.531673101 },
3291           {    0.002954e-6,    -6283.008539689,  4.533471191 },
3292           {    0.002353e-6,      639.897286314,  3.734548088 },
3293           {    0.002401e-6,    16200.772724501,  2.605547070 },
3294           {    0.003053e-6,   233141.314403759,  3.029030662 },
3295           {    0.003024e-6,    83286.914269554,  2.355556099 },
3296           {    0.002863e-6,    17298.182327326,  5.240963796 },
3297           {    0.002103e-6,    -7079.373856808,  5.756641637 },
3298           {    0.002303e-6,    83996.847317911,  2.013686814 },
3299        /* 161, 170 */
3300           {    0.002303e-6,    18073.704938650,  1.089100410 },
3301           {    0.002381e-6,       63.735898303,  0.759188178 },
3302           {    0.002493e-6,     6386.168624210,  0.645026535 },
3303           {    0.002366e-6,        3.932153263,  6.215885448 },
3304           {    0.002169e-6,    11015.106477335,  4.845297676 },
3305           {    0.002397e-6,     6243.458341645,  3.809290043 },
3306           {    0.002183e-6,     1162.474704408,  6.179611691 },
3307           {    0.002353e-6,     6246.427287062,  4.781719760 },
3308           {    0.002199e-6,     -245.831646229,  5.956152284 },
3309           {    0.001729e-6,     3894.181829542,  1.264976635 },
3310        /* 171, 180 */
3311           {    0.001896e-6,    -3128.388765096,  4.914231596 },
3312           {    0.002085e-6,       35.164090221,  1.405158503 },
3313           {    0.002024e-6,    14712.317116458,  2.752035928 },
3314           {    0.001737e-6,     6290.189396992,  5.280820144 },
3315           {    0.002229e-6,      491.557929457,  1.571007057 },
3316           {    0.001602e-6,    14314.168113050,  4.203664806 },
3317           {    0.002186e-6,      454.909366527,  1.402101526 },
3318           {    0.001897e-6,    22483.848574493,  4.167932508 },
3319           {    0.001825e-6,    -3738.761430108,  0.545828785 },
3320           {    0.001894e-6,     1052.268383188,  5.817167450 },
3321        /* 181, 190 */
3322           {    0.001421e-6,       20.355319399,  2.419886601 },
3323           {    0.001408e-6,    10984.192351700,  2.732084787 },
3324           {    0.001847e-6,    10873.986030480,  2.903477885 },
3325           {    0.001391e-6,    -8635.942003763,  0.593891500 },
3326           {    0.001388e-6,       -7.046236698,  1.166145902 },
3327           {    0.001810e-6,   -88860.057071188,  0.487355242 },
3328           {    0.001288e-6,    -1990.745017041,  3.913022880 },
3329           {    0.001297e-6,    23543.230504682,  3.063805171 },
3330           {    0.001335e-6,     -266.607041722,  3.995764039 },
3331           {    0.001376e-6,    10969.965257698,  5.152914309 },
3332        /* 191, 200 */
3333           {    0.001745e-6,   244287.600007027,  3.626395673 },
3334           {    0.001649e-6,    31441.677569757,  1.952049260 },
3335           {    0.001416e-6,     9225.539273283,  4.996408389 },
3336           {    0.001238e-6,     4804.209275927,  5.503379738 },
3337           {    0.001472e-6,     4590.910180489,  4.164913291 },
3338           {    0.001169e-6,     6040.347246017,  5.841719038 },
3339           {    0.001039e-6,     5540.085789459,  2.769753519 },
3340           {    0.001004e-6,     -170.672870619,  0.755008103 },
3341           {    0.001284e-6,    10575.406682942,  5.306538209 },
3342           {    0.001278e-6,       71.812653151,  4.713486491 },
3343        /* 201, 210 */
3344           {    0.001321e-6,    18209.330263660,  2.624866359 },
3345           {    0.001297e-6,    21228.392023546,  0.382603541 },
3346           {    0.000954e-6,     6282.095528923,  0.882213514 },
3347           {    0.001145e-6,     6058.731054289,  1.169483931 },
3348           {    0.000979e-6,     5547.199336460,  5.448375984 },
3349           {    0.000987e-6,    -6262.300454499,  2.656486959 },
3350           {    0.001070e-6,  -154717.609887482,  1.827624012 },
3351           {    0.000991e-6,     4701.116501708,  4.387001801 },
3352           {    0.001155e-6,      -14.227094002,  3.042700750 },
3353           {    0.001176e-6,      277.034993741,  3.335519004 },
3354        /* 211, 220 */
3355           {    0.000890e-6,    13916.019109642,  5.601498297 },
3356           {    0.000884e-6,    -1551.045222648,  1.088831705 },
3357           {    0.000876e-6,     5017.508371365,  3.969902609 },
3358           {    0.000806e-6,    15110.466119866,  5.142876744 },
3359           {    0.000773e-6,    -4136.910433516,  0.022067765 },
3360           {    0.001077e-6,      175.166059800,  1.844913056 },
3361           {    0.000954e-6,    -6284.056171060,  0.968480906 },
3362           {    0.000737e-6,     5326.786694021,  4.923831588 },
3363           {    0.000845e-6,     -433.711737877,  4.749245231 },
3364           {    0.000819e-6,     8662.240323563,  5.991247817 },
3365        /* 221, 230 */
3366           {    0.000852e-6,      199.072001436,  2.189604979 },
3367           {    0.000723e-6,    17256.631536341,  6.068719637 },
3368           {    0.000940e-6,     6037.244203762,  6.197428148 },
3369           {    0.000885e-6,    11712.955318231,  3.280414875 },
3370           {    0.000706e-6,    12559.038152982,  2.824848947 },
3371           {    0.000732e-6,     2379.164473572,  2.501813417 },
3372           {    0.000764e-6,    -6127.655450557,  2.236346329 },
3373           {    0.000908e-6,      131.541961686,  2.521257490 },
3374           {    0.000907e-6,    35371.887265976,  3.370195967 },
3375           {    0.000673e-6,     1066.495477190,  3.876512374 },
3376        /* 231, 240 */
3377           {    0.000814e-6,    17654.780539750,  4.627122566 },
3378           {    0.000630e-6,       36.027866677,  0.156368499 },
3379           {    0.000798e-6,      515.463871093,  5.151962502 },
3380           {    0.000798e-6,      148.078724426,  5.909225055 },
3381           {    0.000806e-6,      309.278322656,  6.054064447 },
3382           {    0.000607e-6,      -39.617508346,  2.839021623 },
3383           {    0.000601e-6,      412.371096874,  3.984225404 },
3384           {    0.000646e-6,    11403.676995575,  3.852959484 },
3385           {    0.000704e-6,    13521.751441591,  2.300991267 },
3386           {    0.000603e-6,   -65147.619767937,  4.140083146 },
3387        /* 241, 250 */
3388           {    0.000609e-6,    10177.257679534,  0.437122327 },
3389           {    0.000631e-6,     5767.611978898,  4.026532329 },
3390           {    0.000576e-6,    11087.285125918,  4.760293101 },
3391           {    0.000674e-6,    14945.316173554,  6.270510511 },
3392           {    0.000726e-6,     5429.879468239,  6.039606892 },
3393           {    0.000710e-6,    28766.924424484,  5.672617711 },
3394           {    0.000647e-6,    11856.218651625,  3.397132627 },
3395           {    0.000678e-6,    -5481.254918868,  6.249666675 },
3396           {    0.000618e-6,    22003.914634870,  2.466427018 },
3397           {    0.000738e-6,     6134.997125565,  2.242668890 },
3398        /* 251, 260 */
3399           {    0.000660e-6,      625.670192312,  5.864091907 },
3400           {    0.000694e-6,     3496.032826134,  2.668309141 },
3401           {    0.000531e-6,     6489.261398429,  1.681888780 },
3402           {    0.000611e-6,  -143571.324284214,  2.424978312 },
3403           {    0.000575e-6,    12043.574281889,  4.216492400 },
3404           {    0.000553e-6,    12416.588502848,  4.772158039 },
3405           {    0.000689e-6,     4686.889407707,  6.224271088 },
3406           {    0.000495e-6,     7342.457780181,  3.817285811 },
3407           {    0.000567e-6,     3634.621024518,  1.649264690 },
3408           {    0.000515e-6,    18635.928454536,  3.945345892 },
3409        /* 261, 270 */
3410           {    0.000486e-6,     -323.505416657,  4.061673868 },
3411           {    0.000662e-6,    25158.601719765,  1.794058369 },
3412           {    0.000509e-6,      846.082834751,  3.053874588 },
3413           {    0.000472e-6,   -12569.674818332,  5.112133338 },
3414           {    0.000461e-6,     6179.983075773,  0.513669325 },
3415           {    0.000641e-6,    83467.156352816,  3.210727723 },
3416           {    0.000520e-6,    10344.295065386,  2.445597761 },
3417           {    0.000493e-6,    18422.629359098,  1.676939306 },
3418           {    0.000478e-6,     1265.567478626,  5.487314569 },
3419           {    0.000472e-6,      -18.159247265,  1.999707589 },
3420        /* 271, 280 */
3421           {    0.000559e-6,    11190.377900137,  5.783236356 },
3422           {    0.000494e-6,     9623.688276691,  3.022645053 },
3423           {    0.000463e-6,     5739.157790895,  1.411223013 },
3424           {    0.000432e-6,    16858.482532933,  1.179256434 },
3425           {    0.000574e-6,    72140.628666286,  1.758191830 },
3426           {    0.000484e-6,    17267.268201691,  3.290589143 },
3427           {    0.000550e-6,     4907.302050146,  0.864024298 },
3428           {    0.000399e-6,       14.977853527,  2.094441910 },
3429           {    0.000491e-6,      224.344795702,  0.878372791 },
3430           {    0.000432e-6,    20426.571092422,  6.003829241 },
3431        /* 281, 290 */
3432           {    0.000481e-6,     5749.452731634,  4.309591964 },
3433           {    0.000480e-6,     5757.317038160,  1.142348571 },
3434           {    0.000485e-6,     6702.560493867,  0.210580917 },
3435           {    0.000426e-6,     6055.549660552,  4.274476529 },
3436           {    0.000480e-6,     5959.570433334,  5.031351030 },
3437           {    0.000466e-6,    12562.628581634,  4.959581597 },
3438           {    0.000520e-6,    39302.096962196,  4.788002889 },
3439           {    0.000458e-6,    12132.439962106,  1.880103788 },
3440           {    0.000470e-6,    12029.347187887,  1.405611197 },
3441           {    0.000416e-6,    -7477.522860216,  1.082356330 },
3442        /* 291, 300 */
3443           {    0.000449e-6,    11609.862544012,  4.179989585 },
3444           {    0.000465e-6,    17253.041107690,  0.353496295 },
3445           {    0.000362e-6,    -4535.059436924,  1.583849576 },
3446           {    0.000383e-6,    21954.157609398,  3.747376371 },
3447           {    0.000389e-6,       17.252277143,  1.395753179 },
3448           {    0.000331e-6,    18052.929543158,  0.566790582 },
3449           {    0.000430e-6,    13517.870106233,  0.685827538 },
3450           {    0.000368e-6,    -5756.908003246,  0.731374317 },
3451           {    0.000330e-6,    10557.594160824,  3.710043680 },
3452           {    0.000332e-6,    20199.094959633,  1.652901407 },
3453        /* 301, 310 */
3454           {    0.000384e-6,    11933.367960670,  5.827781531 },
3455           {    0.000387e-6,    10454.501386605,  2.541182564 },
3456           {    0.000325e-6,    15671.081759407,  2.178850542 },
3457           {    0.000318e-6,      138.517496871,  2.253253037 },
3458           {    0.000305e-6,     9388.005909415,  0.578340206 },
3459           {    0.000352e-6,     5749.861766548,  3.000297967 },
3460           {    0.000311e-6,     6915.859589305,  1.693574249 },
3461           {    0.000297e-6,    24072.921469776,  1.997249392 },
3462           {    0.000363e-6,     -640.877607382,  5.071820966 },
3463           {    0.000323e-6,    12592.450019783,  1.072262823 },
3464        /* 311, 320 */
3465           {    0.000341e-6,    12146.667056108,  4.700657997 },
3466           {    0.000290e-6,     9779.108676125,  1.812320441 },
3467           {    0.000342e-6,     6132.028180148,  4.322238614 },
3468           {    0.000329e-6,     6268.848755990,  3.033827743 },
3469           {    0.000374e-6,    17996.031168222,  3.388716544 },
3470           {    0.000285e-6,     -533.214083444,  4.687313233 },
3471           {    0.000338e-6,     6065.844601290,  0.877776108 },
3472           {    0.000276e-6,       24.298513841,  0.770299429 },
3473           {    0.000336e-6,    -2388.894020449,  5.353796034 },
3474           {    0.000290e-6,     3097.883822726,  4.075291557 },
3475        /* 321, 330 */
3476           {    0.000318e-6,      709.933048357,  5.941207518 },
3477           {    0.000271e-6,    13095.842665077,  3.208912203 },
3478           {    0.000331e-6,     6073.708907816,  4.007881169 },
3479           {    0.000292e-6,      742.990060533,  2.714333592 },
3480           {    0.000362e-6,    29088.811415985,  3.215977013 },
3481           {    0.000280e-6,    12359.966151546,  0.710872502 },
3482           {    0.000267e-6,    10440.274292604,  4.730108488 },
3483           {    0.000262e-6,      838.969287750,  1.327720272 },
3484           {    0.000250e-6,    16496.361396202,  0.898769761 },
3485           {    0.000325e-6,    20597.243963041,  0.180044365 },
3486        /* 331, 340 */
3487           {    0.000268e-6,     6148.010769956,  5.152666276 },
3488           {    0.000284e-6,     5636.065016677,  5.655385808 },
3489           {    0.000301e-6,     6080.822454817,  2.135396205 },
3490           {    0.000294e-6,     -377.373607916,  3.708784168 },
3491           {    0.000236e-6,     2118.763860378,  1.733578756 },
3492           {    0.000234e-6,     5867.523359379,  5.575209112 },
3493           {    0.000268e-6,  -226858.238553767,  0.069432392 },
3494           {    0.000265e-6,   167283.761587465,  4.369302826 },
3495           {    0.000280e-6,    28237.233459389,  5.304829118 },
3496           {    0.000292e-6,    12345.739057544,  4.096094132 },
3497        /* 341, 350 */
3498           {    0.000223e-6,    19800.945956225,  3.069327406 },
3499           {    0.000301e-6,    43232.306658416,  6.205311188 },
3500           {    0.000264e-6,    18875.525869774,  1.417263408 },
3501           {    0.000304e-6,    -1823.175188677,  3.409035232 },
3502           {    0.000301e-6,      109.945688789,  0.510922054 },
3503           {    0.000260e-6,      813.550283960,  2.389438934 },
3504           {    0.000299e-6,   316428.228673312,  5.384595078 },
3505           {    0.000211e-6,     5756.566278634,  3.789392838 },
3506           {    0.000209e-6,     5750.203491159,  1.661943545 },
3507           {    0.000240e-6,    12489.885628707,  5.684549045 },
3508        /* 351, 360 */
3509           {    0.000216e-6,     6303.851245484,  3.862942261 },
3510           {    0.000203e-6,     1581.959348283,  5.549853589 },
3511           {    0.000200e-6,     5642.198242609,  1.016115785 },
3512           {    0.000197e-6,      -70.849445304,  4.690702525 },
3513           {    0.000227e-6,     6287.008003254,  2.911891613 },
3514           {    0.000197e-6,      533.623118358,  1.048982898 },
3515           {    0.000205e-6,    -6279.485421340,  1.829362730 },
3516           {    0.000209e-6,   -10988.808157535,  2.636140084 },
3517           {    0.000208e-6,     -227.526189440,  4.127883842 },
3518           {    0.000191e-6,      415.552490612,  4.401165650 },
3519        /* 361, 370 */
3520           {    0.000190e-6,    29296.615389579,  4.175658539 },
3521           {    0.000264e-6,    66567.485864652,  4.601102551 },
3522           {    0.000256e-6,    -3646.350377354,  0.506364778 },
3523           {    0.000188e-6,    13119.721102825,  2.032195842 },
3524           {    0.000185e-6,     -209.366942175,  4.694756586 },
3525           {    0.000198e-6,    25934.124331089,  3.832703118 },
3526           {    0.000195e-6,     4061.219215394,  3.308463427 },
3527           {    0.000234e-6,     5113.487598583,  1.716090661 },
3528           {    0.000188e-6,     1478.866574064,  5.686865780 },
3529           {    0.000222e-6,    11823.161639450,  1.942386641 },
3530        /* 371, 380 */
3531           {    0.000181e-6,    10770.893256262,  1.999482059 },
3532           {    0.000171e-6,     6546.159773364,  1.182807992 },
3533           {    0.000206e-6,       70.328180442,  5.934076062 },
3534           {    0.000169e-6,    20995.392966449,  2.169080622 },
3535           {    0.000191e-6,    10660.686935042,  5.405515999 },
3536           {    0.000228e-6,    33019.021112205,  4.656985514 },
3537           {    0.000184e-6,    -4933.208440333,  3.327476868 },
3538           {    0.000220e-6,     -135.625325010,  1.765430262 },
3539           {    0.000166e-6,    23141.558382925,  3.454132746 },
3540           {    0.000191e-6,     6144.558353121,  5.020393445 },
3541        /* 381, 390 */
3542           {    0.000180e-6,     6084.003848555,  0.602182191 },
3543           {    0.000163e-6,    17782.732072784,  4.960593133 },
3544           {    0.000225e-6,    16460.333529525,  2.596451817 },
3545           {    0.000222e-6,     5905.702242076,  3.731990323 },
3546           {    0.000204e-6,      227.476132789,  5.636192701 },
3547           {    0.000159e-6,    16737.577236597,  3.600691544 },
3548           {    0.000200e-6,     6805.653268085,  0.868220961 },
3549           {    0.000187e-6,    11919.140866668,  2.629456641 },
3550           {    0.000161e-6,      127.471796607,  2.862574720 },
3551           {    0.000205e-6,     6286.666278643,  1.742882331 },
3552        /* 391, 400 */
3553           {    0.000189e-6,      153.778810485,  4.812372643 },
3554           {    0.000168e-6,    16723.350142595,  0.027860588 },
3555           {    0.000149e-6,    11720.068865232,  0.659721876 },
3556           {    0.000189e-6,     5237.921013804,  5.245313000 },
3557           {    0.000143e-6,     6709.674040867,  4.317625647 },
3558           {    0.000146e-6,     4487.817406270,  4.815297007 },
3559           {    0.000144e-6,     -664.756045130,  5.381366880 },
3560           {    0.000175e-6,     5127.714692584,  4.728443327 },
3561           {    0.000162e-6,     6254.626662524,  1.435132069 },
3562           {    0.000187e-6,    47162.516354635,  1.354371923 },
3563        /* 401, 410 */
3564           {    0.000146e-6,    11080.171578918,  3.369695406 },
3565           {    0.000180e-6,     -348.924420448,  2.490902145 },
3566           {    0.000148e-6,      151.047669843,  3.799109588 },
3567           {    0.000157e-6,     6197.248551160,  1.284375887 },
3568           {    0.000167e-6,      146.594251718,  0.759969109 },
3569           {    0.000133e-6,    -5331.357443741,  5.409701889 },
3570           {    0.000154e-6,       95.979227218,  3.366890614 },
3571           {    0.000148e-6,    -6418.140930027,  3.384104996 },
3572           {    0.000128e-6,    -6525.804453965,  3.803419985 },
3573           {    0.000130e-6,    11293.470674356,  0.939039445 },
3574        /* 411, 420 */
3575           {    0.000152e-6,    -5729.506447149,  0.734117523 },
3576           {    0.000138e-6,      210.117701700,  2.564216078 },
3577           {    0.000123e-6,     6066.595360816,  4.517099537 },
3578           {    0.000140e-6,    18451.078546566,  0.642049130 },
3579           {    0.000126e-6,    11300.584221356,  3.485280663 },
3580           {    0.000119e-6,    10027.903195729,  3.217431161 },
3581           {    0.000151e-6,     4274.518310832,  4.404359108 },
3582           {    0.000117e-6,     6072.958148291,  0.366324650 },
3583           {    0.000165e-6,    -7668.637425143,  4.298212528 },
3584           {    0.000117e-6,    -6245.048177356,  5.379518958 },
3585        /* 421, 430 */
3586           {    0.000130e-6,    -5888.449964932,  4.527681115 },
3587           {    0.000121e-6,     -543.918059096,  6.109429504 },
3588           {    0.000162e-6,     9683.594581116,  5.720092446 },
3589           {    0.000141e-6,     6219.339951688,  0.679068671 },
3590           {    0.000118e-6,    22743.409379516,  4.881123092 },
3591           {    0.000129e-6,     1692.165669502,  0.351407289 },
3592           {    0.000126e-6,     5657.405657679,  5.146592349 },
3593           {    0.000114e-6,      728.762966531,  0.520791814 },
3594           {    0.000120e-6,       52.596639600,  0.948516300 },
3595           {    0.000115e-6,       65.220371012,  3.504914846 },
3596        /* 431, 440 */
3597           {    0.000126e-6,     5881.403728234,  5.577502482 },
3598           {    0.000158e-6,   163096.180360983,  2.957128968 },
3599           {    0.000134e-6,    12341.806904281,  2.598576764 },
3600           {    0.000151e-6,    16627.370915377,  3.985702050 },
3601           {    0.000109e-6,     1368.660252845,  0.014730471 },
3602           {    0.000131e-6,     6211.263196841,  0.085077024 },
3603           {    0.000146e-6,     5792.741760812,  0.708426604 },
3604           {    0.000146e-6,      -77.750543984,  3.121576600 },
3605           {    0.000107e-6,     5341.013788022,  0.288231904 },
3606           {    0.000138e-6,     6281.591377283,  2.797450317 },
3607        /* 441, 450 */
3608           {    0.000113e-6,    -6277.552925684,  2.788904128 },
3609           {    0.000115e-6,     -525.758811831,  5.895222200 },
3610           {    0.000138e-6,     6016.468808270,  6.096188999 },
3611           {    0.000139e-6,    23539.707386333,  2.028195445 },
3612           {    0.000146e-6,    -4176.041342449,  4.660008502 },
3613           {    0.000107e-6,    16062.184526117,  4.066520001 },
3614           {    0.000142e-6,    83783.548222473,  2.936315115 },
3615           {    0.000128e-6,     9380.959672717,  3.223844306 },
3616           {    0.000135e-6,     6205.325306007,  1.638054048 },
3617           {    0.000101e-6,     2699.734819318,  5.481603249 },
3618        /* 451, 460 */
3619           {    0.000104e-6,     -568.821874027,  2.205734493 },
3620           {    0.000103e-6,     6321.103522627,  2.440421099 },
3621           {    0.000119e-6,     6321.208885629,  2.547496264 },
3622           {    0.000138e-6,     1975.492545856,  2.314608466 },
3623           {    0.000121e-6,      137.033024162,  4.539108237 },
3624           {    0.000123e-6,    19402.796952817,  4.538074405 },
3625           {    0.000119e-6,    22805.735565994,  2.869040566 },
3626           {    0.000133e-6,    64471.991241142,  6.056405489 },
3627           {    0.000129e-6,      -85.827298831,  2.540635083 },
3628           {    0.000131e-6,    13613.804277336,  4.005732868 },
3629        /* 461, 470 */
3630           {    0.000104e-6,     9814.604100291,  1.959967212 },
3631           {    0.000112e-6,    16097.679950283,  3.589026260 },
3632           {    0.000123e-6,     2107.034507542,  1.728627253 },
3633           {    0.000121e-6,    36949.230808424,  6.072332087 },
3634           {    0.000108e-6,   -12539.853380183,  3.716133846 },
3635           {    0.000113e-6,    -7875.671863624,  2.725771122 },
3636           {    0.000109e-6,     4171.425536614,  4.033338079 },
3637           {    0.000101e-6,     6247.911759770,  3.441347021 },
3638           {    0.000113e-6,     7330.728427345,  0.656372122 },
3639           {    0.000113e-6,    51092.726050855,  2.791483066 },
3640        /* 471, 480 */
3641           {    0.000106e-6,     5621.842923210,  1.815323326 },
3642           {    0.000101e-6,      111.430161497,  5.711033677 },
3643           {    0.000103e-6,      909.818733055,  2.812745443 },
3644           {    0.000101e-6,     1790.642637886,  1.965746028 },
3645 
3646        /* T */
3647           {  102.156724e-6,     6283.075849991,  4.249032005 },
3648           {    1.706807e-6,    12566.151699983,  4.205904248 },
3649           {    0.269668e-6,      213.299095438,  3.400290479 },
3650           {    0.265919e-6,      529.690965095,  5.836047367 },
3651           {    0.210568e-6,       -3.523118349,  6.262738348 },
3652           {    0.077996e-6,     5223.693919802,  4.670344204 },
3653        /* 481, 490 */
3654           {    0.054764e-6,     1577.343542448,  4.534800170 },
3655           {    0.059146e-6,       26.298319800,  1.083044735 },
3656           {    0.034420e-6,     -398.149003408,  5.980077351 },
3657           {    0.032088e-6,    18849.227549974,  4.162913471 },
3658           {    0.033595e-6,     5507.553238667,  5.980162321 },
3659           {    0.029198e-6,     5856.477659115,  0.623811863 },
3660           {    0.027764e-6,      155.420399434,  3.745318113 },
3661           {    0.025190e-6,     5746.271337896,  2.980330535 },
3662           {    0.022997e-6,     -796.298006816,  1.174411803 },
3663           {    0.024976e-6,     5760.498431898,  2.467913690 },
3664        /* 491, 500 */
3665           {    0.021774e-6,      206.185548437,  3.854787540 },
3666           {    0.017925e-6,     -775.522611324,  1.092065955 },
3667           {    0.013794e-6,      426.598190876,  2.699831988 },
3668           {    0.013276e-6,     6062.663207553,  5.845801920 },
3669           {    0.011774e-6,    12036.460734888,  2.292832062 },
3670           {    0.012869e-6,     6076.890301554,  5.333425680 },
3671           {    0.012152e-6,     1059.381930189,  6.222874454 },
3672           {    0.011081e-6,       -7.113547001,  5.154724984 },
3673           {    0.010143e-6,     4694.002954708,  4.044013795 },
3674           {    0.009357e-6,     5486.777843175,  3.416081409 },
3675        /* 501, 510 */
3676           {    0.010084e-6,      522.577418094,  0.749320262 },
3677           {    0.008587e-6,    10977.078804699,  2.777152598 },
3678           {    0.008628e-6,     6275.962302991,  4.562060226 },
3679           {    0.008158e-6,     -220.412642439,  5.806891533 },
3680           {    0.007746e-6,     2544.314419883,  1.603197066 },
3681           {    0.007670e-6,     2146.165416475,  3.000200440 },
3682           {    0.007098e-6,       74.781598567,  0.443725817 },
3683           {    0.006180e-6,     -536.804512095,  1.302642751 },
3684           {    0.005818e-6,     5088.628839767,  4.827723531 },
3685           {    0.004945e-6,    -6286.598968340,  0.268305170 },
3686        /* 511, 520 */
3687           {    0.004774e-6,     1349.867409659,  5.808636673 },
3688           {    0.004687e-6,     -242.728603974,  5.154890570 },
3689           {    0.006089e-6,     1748.016413067,  4.403765209 },
3690           {    0.005975e-6,    -1194.447010225,  2.583472591 },
3691           {    0.004229e-6,      951.718406251,  0.931172179 },
3692           {    0.005264e-6,      553.569402842,  2.336107252 },
3693           {    0.003049e-6,     5643.178563677,  1.362634430 },
3694           {    0.002974e-6,     6812.766815086,  1.583012668 },
3695           {    0.003403e-6,    -2352.866153772,  2.552189886 },
3696           {    0.003030e-6,      419.484643875,  5.286473844 },
3697        /* 521, 530 */
3698           {    0.003210e-6,       -7.046236698,  1.863796539 },
3699           {    0.003058e-6,     9437.762934887,  4.226420633 },
3700           {    0.002589e-6,    12352.852604545,  1.991935820 },
3701           {    0.002927e-6,     5216.580372801,  2.319951253 },
3702           {    0.002425e-6,     5230.807466803,  3.084752833 },
3703           {    0.002656e-6,     3154.687084896,  2.487447866 },
3704           {    0.002445e-6,    10447.387839604,  2.347139160 },
3705           {    0.002990e-6,     4690.479836359,  6.235872050 },
3706           {    0.002890e-6,     5863.591206116,  0.095197563 },
3707           {    0.002498e-6,     6438.496249426,  2.994779800 },
3708        /* 531, 540 */
3709           {    0.001889e-6,     8031.092263058,  3.569003717 },
3710           {    0.002567e-6,      801.820931124,  3.425611498 },
3711           {    0.001803e-6,   -71430.695617928,  2.192295512 },
3712           {    0.001782e-6,        3.932153263,  5.180433689 },
3713           {    0.001694e-6,    -4705.732307544,  4.641779174 },
3714           {    0.001704e-6,    -1592.596013633,  3.997097652 },
3715           {    0.001735e-6,     5849.364112115,  0.417558428 },
3716           {    0.001643e-6,     8429.241266467,  2.180619584 },
3717           {    0.001680e-6,       38.133035638,  4.164529426 },
3718           {    0.002045e-6,     7084.896781115,  0.526323854 },
3719        /* 541, 550 */
3720           {    0.001458e-6,     4292.330832950,  1.356098141 },
3721           {    0.001437e-6,       20.355319399,  3.895439360 },
3722           {    0.001738e-6,     6279.552731642,  0.087484036 },
3723           {    0.001367e-6,    14143.495242431,  3.987576591 },
3724           {    0.001344e-6,     7234.794256242,  0.090454338 },
3725           {    0.001438e-6,    11499.656222793,  0.974387904 },
3726           {    0.001257e-6,     6836.645252834,  1.509069366 },
3727           {    0.001358e-6,    11513.883316794,  0.495572260 },
3728           {    0.001628e-6,     7632.943259650,  4.968445721 },
3729           {    0.001169e-6,      103.092774219,  2.838496795 },
3730        /* 551, 560 */
3731           {    0.001162e-6,     4164.311989613,  3.408387778 },
3732           {    0.001092e-6,     6069.776754553,  3.617942651 },
3733           {    0.001008e-6,    17789.845619785,  0.286350174 },
3734           {    0.001008e-6,      639.897286314,  1.610762073 },
3735           {    0.000918e-6,    10213.285546211,  5.532798067 },
3736           {    0.001011e-6,    -6256.777530192,  0.661826484 },
3737           {    0.000753e-6,    16730.463689596,  3.905030235 },
3738           {    0.000737e-6,    11926.254413669,  4.641956361 },
3739           {    0.000694e-6,     3340.612426700,  2.111120332 },
3740           {    0.000701e-6,     3894.181829542,  2.760823491 },
3741        /* 561, 570 */
3742           {    0.000689e-6,     -135.065080035,  4.768800780 },
3743           {    0.000700e-6,    13367.972631107,  5.760439898 },
3744           {    0.000664e-6,     6040.347246017,  1.051215840 },
3745           {    0.000654e-6,     5650.292110678,  4.911332503 },
3746           {    0.000788e-6,     6681.224853400,  4.699648011 },
3747           {    0.000628e-6,     5333.900241022,  5.024608847 },
3748           {    0.000755e-6,     -110.206321219,  4.370971253 },
3749           {    0.000628e-6,     6290.189396992,  3.660478857 },
3750           {    0.000635e-6,    25132.303399966,  4.121051532 },
3751           {    0.000534e-6,     5966.683980335,  1.173284524 },
3752        /* 571, 580 */
3753           {    0.000543e-6,     -433.711737877,  0.345585464 },
3754           {    0.000517e-6,    -1990.745017041,  5.414571768 },
3755           {    0.000504e-6,     5767.611978898,  2.328281115 },
3756           {    0.000485e-6,     5753.384884897,  1.685874771 },
3757           {    0.000463e-6,     7860.419392439,  5.297703006 },
3758           {    0.000604e-6,      515.463871093,  0.591998446 },
3759           {    0.000443e-6,    12168.002696575,  4.830881244 },
3760           {    0.000570e-6,      199.072001436,  3.899190272 },
3761           {    0.000465e-6,    10969.965257698,  0.476681802 },
3762           {    0.000424e-6,    -7079.373856808,  1.112242763 },
3763        /* 581, 590 */
3764           {    0.000427e-6,      735.876513532,  1.994214480 },
3765           {    0.000478e-6,    -6127.655450557,  3.778025483 },
3766           {    0.000414e-6,    10973.555686350,  5.441088327 },
3767           {    0.000512e-6,     1589.072895284,  0.107123853 },
3768           {    0.000378e-6,    10984.192351700,  0.915087231 },
3769           {    0.000402e-6,    11371.704689758,  4.107281715 },
3770           {    0.000453e-6,     9917.696874510,  1.917490952 },
3771           {    0.000395e-6,      149.563197135,  2.763124165 },
3772           {    0.000371e-6,     5739.157790895,  3.112111866 },
3773           {    0.000350e-6,    11790.629088659,  0.440639857 },
3774        /* 591, 600 */
3775           {    0.000356e-6,     6133.512652857,  5.444568842 },
3776           {    0.000344e-6,      412.371096874,  5.676832684 },
3777           {    0.000383e-6,      955.599741609,  5.559734846 },
3778           {    0.000333e-6,     6496.374945429,  0.261537984 },
3779           {    0.000340e-6,     6055.549660552,  5.975534987 },
3780           {    0.000334e-6,     1066.495477190,  2.335063907 },
3781           {    0.000399e-6,    11506.769769794,  5.321230910 },
3782           {    0.000314e-6,    18319.536584880,  2.313312404 },
3783           {    0.000424e-6,     1052.268383188,  1.211961766 },
3784           {    0.000307e-6,       63.735898303,  3.169551388 },
3785        /* 601, 610 */
3786           {    0.000329e-6,       29.821438149,  6.106912080 },
3787           {    0.000357e-6,     6309.374169791,  4.223760346 },
3788           {    0.000312e-6,    -3738.761430108,  2.180556645 },
3789           {    0.000301e-6,      309.278322656,  1.499984572 },
3790           {    0.000268e-6,    12043.574281889,  2.447520648 },
3791           {    0.000257e-6,    12491.370101415,  3.662331761 },
3792           {    0.000290e-6,      625.670192312,  1.272834584 },
3793           {    0.000256e-6,     5429.879468239,  1.913426912 },
3794           {    0.000339e-6,     3496.032826134,  4.165930011 },
3795           {    0.000283e-6,     3930.209696220,  4.325565754 },
3796        /* 611, 620 */
3797           {    0.000241e-6,    12528.018664345,  3.832324536 },
3798           {    0.000304e-6,     4686.889407707,  1.612348468 },
3799           {    0.000259e-6,    16200.772724501,  3.470173146 },
3800           {    0.000238e-6,    12139.553509107,  1.147977842 },
3801           {    0.000236e-6,     6172.869528772,  3.776271728 },
3802           {    0.000296e-6,    -7058.598461315,  0.460368852 },
3803           {    0.000306e-6,    10575.406682942,  0.554749016 },
3804           {    0.000251e-6,    17298.182327326,  0.834332510 },
3805           {    0.000290e-6,     4732.030627343,  4.759564091 },
3806           {    0.000261e-6,     5884.926846583,  0.298259862 },
3807        /* 621, 630 */
3808           {    0.000249e-6,     5547.199336460,  3.749366406 },
3809           {    0.000213e-6,    11712.955318231,  5.415666119 },
3810           {    0.000223e-6,     4701.116501708,  2.703203558 },
3811           {    0.000268e-6,     -640.877607382,  0.283670793 },
3812           {    0.000209e-6,     5636.065016677,  1.238477199 },
3813           {    0.000193e-6,    10177.257679534,  1.943251340 },
3814           {    0.000182e-6,     6283.143160294,  2.456157599 },
3815           {    0.000184e-6,     -227.526189440,  5.888038582 },
3816           {    0.000182e-6,    -6283.008539689,  0.241332086 },
3817           {    0.000228e-6,    -6284.056171060,  2.657323816 },
3818        /* 631, 640 */
3819           {    0.000166e-6,     7238.675591600,  5.930629110 },
3820           {    0.000167e-6,     3097.883822726,  5.570955333 },
3821           {    0.000159e-6,     -323.505416657,  5.786670700 },
3822           {    0.000154e-6,    -4136.910433516,  1.517805532 },
3823           {    0.000176e-6,    12029.347187887,  3.139266834 },
3824           {    0.000167e-6,    12132.439962106,  3.556352289 },
3825           {    0.000153e-6,      202.253395174,  1.463313961 },
3826           {    0.000157e-6,    17267.268201691,  1.586837396 },
3827           {    0.000142e-6,    83996.847317911,  0.022670115 },
3828           {    0.000152e-6,    17260.154654690,  0.708528947 },
3829        /* 641, 650 */
3830           {    0.000144e-6,     6084.003848555,  5.187075177 },
3831           {    0.000135e-6,     5756.566278634,  1.993229262 },
3832           {    0.000134e-6,     5750.203491159,  3.457197134 },
3833           {    0.000144e-6,     5326.786694021,  6.066193291 },
3834           {    0.000160e-6,    11015.106477335,  1.710431974 },
3835           {    0.000133e-6,     3634.621024518,  2.836451652 },
3836           {    0.000134e-6,    18073.704938650,  5.453106665 },
3837           {    0.000134e-6,     1162.474704408,  5.326898811 },
3838           {    0.000128e-6,     5642.198242609,  2.511652591 },
3839           {    0.000160e-6,      632.783739313,  5.628785365 },
3840        /* 651, 660 */
3841           {    0.000132e-6,    13916.019109642,  0.819294053 },
3842           {    0.000122e-6,    14314.168113050,  5.677408071 },
3843           {    0.000125e-6,    12359.966151546,  5.251984735 },
3844           {    0.000121e-6,     5749.452731634,  2.210924603 },
3845           {    0.000136e-6,     -245.831646229,  1.646502367 },
3846           {    0.000120e-6,     5757.317038160,  3.240883049 },
3847           {    0.000134e-6,    12146.667056108,  3.059480037 },
3848           {    0.000137e-6,     6206.809778716,  1.867105418 },
3849           {    0.000141e-6,    17253.041107690,  2.069217456 },
3850           {    0.000129e-6,    -7477.522860216,  2.781469314 },
3851        /* 661, 670 */
3852           {    0.000116e-6,     5540.085789459,  4.281176991 },
3853           {    0.000116e-6,     9779.108676125,  3.320925381 },
3854           {    0.000129e-6,     5237.921013804,  3.497704076 },
3855           {    0.000113e-6,     5959.570433334,  0.983210840 },
3856           {    0.000122e-6,     6282.095528923,  2.674938860 },
3857           {    0.000140e-6,      -11.045700264,  4.957936982 },
3858           {    0.000108e-6,    23543.230504682,  1.390113589 },
3859           {    0.000106e-6,   -12569.674818332,  0.429631317 },
3860           {    0.000110e-6,     -266.607041722,  5.501340197 },
3861           {    0.000115e-6,    12559.038152982,  4.691456618 },
3862        /* 671, 680 */
3863           {    0.000134e-6,    -2388.894020449,  0.577313584 },
3864           {    0.000109e-6,    10440.274292604,  6.218148717 },
3865           {    0.000102e-6,     -543.918059096,  1.477842615 },
3866           {    0.000108e-6,    21228.392023546,  2.237753948 },
3867           {    0.000101e-6,    -4535.059436924,  3.100492232 },
3868           {    0.000103e-6,       76.266071276,  5.594294322 },
3869           {    0.000104e-6,      949.175608970,  5.674287810 },
3870           {    0.000101e-6,    13517.870106233,  2.196632348 },
3871           {    0.000100e-6,    11933.367960670,  4.056084160 },
3872 
3873        /* T^2 */
3874           {    4.322990e-6,     6283.075849991,  2.642893748 },
3875        /* 681, 690 */
3876           {    0.406495e-6,        0.000000000,  4.712388980 },
3877           {    0.122605e-6,    12566.151699983,  2.438140634 },
3878           {    0.019476e-6,      213.299095438,  1.642186981 },
3879           {    0.016916e-6,      529.690965095,  4.510959344 },
3880           {    0.013374e-6,       -3.523118349,  1.502210314 },
3881           {    0.008042e-6,       26.298319800,  0.478549024 },
3882           {    0.007824e-6,      155.420399434,  5.254710405 },
3883           {    0.004894e-6,     5746.271337896,  4.683210850 },
3884           {    0.004875e-6,     5760.498431898,  0.759507698 },
3885           {    0.004416e-6,     5223.693919802,  6.028853166 },
3886        /* 691, 700 */
3887           {    0.004088e-6,       -7.113547001,  0.060926389 },
3888           {    0.004433e-6,    77713.771467920,  3.627734103 },
3889           {    0.003277e-6,    18849.227549974,  2.327912542 },
3890           {    0.002703e-6,     6062.663207553,  1.271941729 },
3891           {    0.003435e-6,     -775.522611324,  0.747446224 },
3892           {    0.002618e-6,     6076.890301554,  3.633715689 },
3893           {    0.003146e-6,      206.185548437,  5.647874613 },
3894           {    0.002544e-6,     1577.343542448,  6.232904270 },
3895           {    0.002218e-6,     -220.412642439,  1.309509946 },
3896           {    0.002197e-6,     5856.477659115,  2.407212349 },
3897        /* 701, 710 */
3898           {    0.002897e-6,     5753.384884897,  5.863842246 },
3899           {    0.001766e-6,      426.598190876,  0.754113147 },
3900           {    0.001738e-6,     -796.298006816,  2.714942671 },
3901           {    0.001695e-6,      522.577418094,  2.629369842 },
3902           {    0.001584e-6,     5507.553238667,  1.341138229 },
3903           {    0.001503e-6,     -242.728603974,  0.377699736 },
3904           {    0.001552e-6,     -536.804512095,  2.904684667 },
3905           {    0.001370e-6,     -398.149003408,  1.265599125 },
3906           {    0.001889e-6,    -5573.142801634,  4.413514859 },
3907           {    0.001722e-6,     6069.776754553,  2.445966339 },
3908        /* 711, 720 */
3909           {    0.001124e-6,     1059.381930189,  5.041799657 },
3910           {    0.001258e-6,      553.569402842,  3.849557278 },
3911           {    0.000831e-6,      951.718406251,  2.471094709 },
3912           {    0.000767e-6,     4694.002954708,  5.363125422 },
3913           {    0.000756e-6,     1349.867409659,  1.046195744 },
3914           {    0.000775e-6,      -11.045700264,  0.245548001 },
3915           {    0.000597e-6,     2146.165416475,  4.543268798 },
3916           {    0.000568e-6,     5216.580372801,  4.178853144 },
3917           {    0.000711e-6,     1748.016413067,  5.934271972 },
3918           {    0.000499e-6,    12036.460734888,  0.624434410 },
3919        /* 721, 730 */
3920           {    0.000671e-6,    -1194.447010225,  4.136047594 },
3921           {    0.000488e-6,     5849.364112115,  2.209679987 },
3922           {    0.000621e-6,     6438.496249426,  4.518860804 },
3923           {    0.000495e-6,    -6286.598968340,  1.868201275 },
3924           {    0.000456e-6,     5230.807466803,  1.271231591 },
3925           {    0.000451e-6,     5088.628839767,  0.084060889 },
3926           {    0.000435e-6,     5643.178563677,  3.324456609 },
3927           {    0.000387e-6,    10977.078804699,  4.052488477 },
3928           {    0.000547e-6,   161000.685737473,  2.841633844 },
3929           {    0.000522e-6,     3154.687084896,  2.171979966 },
3930        /* 731, 740 */
3931           {    0.000375e-6,     5486.777843175,  4.983027306 },
3932           {    0.000421e-6,     5863.591206116,  4.546432249 },
3933           {    0.000439e-6,     7084.896781115,  0.522967921 },
3934           {    0.000309e-6,     2544.314419883,  3.172606705 },
3935           {    0.000347e-6,     4690.479836359,  1.479586566 },
3936           {    0.000317e-6,      801.820931124,  3.553088096 },
3937           {    0.000262e-6,      419.484643875,  0.606635550 },
3938           {    0.000248e-6,     6836.645252834,  3.014082064 },
3939           {    0.000245e-6,    -1592.596013633,  5.519526220 },
3940           {    0.000225e-6,     4292.330832950,  2.877956536 },
3941        /* 741, 750 */
3942           {    0.000214e-6,     7234.794256242,  1.605227587 },
3943           {    0.000205e-6,     5767.611978898,  0.625804796 },
3944           {    0.000180e-6,    10447.387839604,  3.499954526 },
3945           {    0.000229e-6,      199.072001436,  5.632304604 },
3946           {    0.000214e-6,      639.897286314,  5.960227667 },
3947           {    0.000175e-6,     -433.711737877,  2.162417992 },
3948           {    0.000209e-6,      515.463871093,  2.322150893 },
3949           {    0.000173e-6,     6040.347246017,  2.556183691 },
3950           {    0.000184e-6,     6309.374169791,  4.732296790 },
3951           {    0.000227e-6,   149854.400134205,  5.385812217 },
3952        /* 751, 760 */
3953           {    0.000154e-6,     8031.092263058,  5.120720920 },
3954           {    0.000151e-6,     5739.157790895,  4.815000443 },
3955           {    0.000197e-6,     7632.943259650,  0.222827271 },
3956           {    0.000197e-6,       74.781598567,  3.910456770 },
3957           {    0.000138e-6,     6055.549660552,  1.397484253 },
3958           {    0.000149e-6,    -6127.655450557,  5.333727496 },
3959           {    0.000137e-6,     3894.181829542,  4.281749907 },
3960           {    0.000135e-6,     9437.762934887,  5.979971885 },
3961           {    0.000139e-6,    -2352.866153772,  4.715630782 },
3962           {    0.000142e-6,     6812.766815086,  0.513330157 },
3963        /* 761, 770 */
3964           {    0.000120e-6,    -4705.732307544,  0.194160689 },
3965           {    0.000131e-6,   -71430.695617928,  0.000379226 },
3966           {    0.000124e-6,     6279.552731642,  2.122264908 },
3967           {    0.000108e-6,    -6256.777530192,  0.883445696 },
3968 
3969        /* T^3 */
3970           {    0.143388e-6,     6283.075849991,  1.131453581 },
3971           {    0.006671e-6,    12566.151699983,  0.775148887 },
3972           {    0.001480e-6,      155.420399434,  0.480016880 },
3973           {    0.000934e-6,      213.299095438,  6.144453084 },
3974           {    0.000795e-6,      529.690965095,  2.941595619 },
3975           {    0.000673e-6,     5746.271337896,  0.120415406 },
3976        /* 771, 780 */
3977           {    0.000672e-6,     5760.498431898,  5.317009738 },
3978           {    0.000389e-6,     -220.412642439,  3.090323467 },
3979           {    0.000373e-6,     6062.663207553,  3.003551964 },
3980           {    0.000360e-6,     6076.890301554,  1.918913041 },
3981           {    0.000316e-6,      -21.340641002,  5.545798121 },
3982           {    0.000315e-6,     -242.728603974,  1.884932563 },
3983           {    0.000278e-6,      206.185548437,  1.266254859 },
3984           {    0.000238e-6,     -536.804512095,  4.532664830 },
3985           {    0.000185e-6,      522.577418094,  4.578313856 },
3986           {    0.000245e-6,    18849.227549974,  0.587467082 },
3987        /* 781, 787 */
3988           {    0.000180e-6,      426.598190876,  5.151178553 },
3989           {    0.000200e-6,      553.569402842,  5.355983739 },
3990           {    0.000141e-6,     5223.693919802,  1.336556009 },
3991           {    0.000104e-6,     5856.477659115,  4.239842759 },
3992 
3993        /* T^4 */
3994           {    0.003826e-6,     6283.075849991,  5.705257275 },
3995           {    0.000303e-6,    12566.151699983,  5.407132842 },
3996           {    0.000209e-6,      155.420399434,  1.989815753 }
3997        };
3998 
3999 
4000     /* Time since J2000.0 in Julian millennia. */
4001        t = ((date1 - DJ00) + date2) / DJM;
4002 
4003     /* ================= */
4004     /* Topocentric terms */
4005     /* ================= */
4006 
4007     /* Convert UT to local solar time in radians. */
4008        tsol = fmod(ut, 1.0) * D2PI + elong;
4009 
4010     /* FUNDAMENTAL ARGUMENTS:  Simon et al. 1994. */
4011 
4012     /* Combine time argument (millennia) with deg/arcsec factor. */
4013        w = t / 3600.0;
4014 
4015     /* Sun Mean Longitude. */
4016        elsun = fmod(280.46645683 + 1296027711.03429 * w, 360.0) * DD2R;
4017 
4018     /* Sun Mean Anomaly. */
4019        emsun = fmod(357.52910918 + 1295965810.481 * w, 360.0) * DD2R;
4020 
4021     /* Mean Elongation of Moon from Sun. */
4022        d = fmod(297.85019547 + 16029616012.090 * w, 360.0) * DD2R;
4023 
4024     /* Mean Longitude of Jupiter. */
4025        elj = fmod(34.35151874 + 109306899.89453 * w, 360.0) * DD2R;
4026 
4027     /* Mean Longitude of Saturn. */
4028        els = fmod(50.07744430 + 44046398.47038 * w, 360.0) * DD2R;
4029 
4030     /* TOPOCENTRIC TERMS:  Moyer 1981 and Murray 1983. */
4031        wt =   +  0.00029e-10 * u * sin(tsol + elsun - els)
4032               +  0.00100e-10 * u * sin(tsol - 2.0 * emsun)
4033               +  0.00133e-10 * u * sin(tsol - d)
4034               +  0.00133e-10 * u * sin(tsol + elsun - elj)
4035               -  0.00229e-10 * u * sin(tsol + 2.0 * elsun + emsun)
4036               -  0.02200e-10 * v * cos(elsun + emsun)
4037               +  0.05312e-10 * u * sin(tsol - emsun)
4038               -  0.13677e-10 * u * sin(tsol + 2.0 * elsun)
4039               -  1.31840e-10 * v * cos(elsun)
4040               +  3.17679e-10 * u * sin(tsol);
4041 
4042     /* ===================== */
4043     /* Fairhead et al. model */
4044     /* ===================== */
4045 
4046     /* T**0 */
4047        w0 = 0;
4048        for (j = 473; j >= 0; j--) {
4049           w0 += fairhd[j][0] * sin(fairhd[j][1] * t + fairhd[j][2]);
4050        }
4051 
4052     /* T**1 */
4053        w1 = 0;
4054        for (j = 678; j >= 474; j--) {
4055           w1 += fairhd[j][0] * sin(fairhd[j][1] * t + fairhd[j][2]);
4056        }
4057 
4058     /* T**2 */
4059        w2 = 0;
4060        for (j = 763; j >= 679; j--) {
4061           w2 += fairhd[j][0] * sin(fairhd[j][1] * t + fairhd[j][2]);
4062        }
4063 
4064     /* T**3 */
4065        w3 = 0;
4066        for (j = 783; j >= 764; j--) {
4067           w3 += fairhd[j][0] * sin(fairhd[j][1] * t + fairhd[j][2]);
4068        }
4069 
4070     /* T**4 */
4071        w4 = 0;
4072        for (j = 786; j >= 784; j--) {
4073           w4 += fairhd[j][0] * sin(fairhd[j][1] * t + fairhd[j][2]);
4074        }
4075 
4076     /* Multiply by powers of T and combine. */
4077        wf = t * (t * (t * (t * w4 + w3) + w2) + w1) + w0;
4078 
4079     /* Adjustments to use JPL planetary masses instead of IAU. */
4080        wj =   0.00065e-6 * sin(6069.776754 * t + 4.021194) +
4081               0.00033e-6 * sin( 213.299095 * t + 5.543132) +
4082             (-0.00196e-6 * sin(6208.294251 * t + 5.696701)) +
4083             (-0.00173e-6 * sin(  74.781599 * t + 2.435900)) +
4084               0.03638e-6 * t * t;
4085 
4086     /* ============ */
4087     /* Final result */
4088     /* ============ */
4089 
4090     /* TDB-TT in seconds. */
4091        w = wt + wf + wj;
4092 
4093        return w;
4094 
4095         }
4096     
4097 
4098     /**
4099     *  The equation of the equinoxes, compatible with IAU 2000 resolutions,
4100     *  given the nutation in longitude and the mean obliquity.
4101     *
4102     *<p>This function is derived from the International Astronomical Union's
4103     *  SOFA (Standards Of Fundamental Astronomy) software collection.
4104     *
4105     *<p>Status:  canonical model.
4106     *
4107     *<!-- Given: -->
4108     *     @param date1 double TT as a 2-part Julian Date (Note 1)
4109     *     @param date2 double TT as a 2-part Julian Date (Note 1)
4110     *     @param epsa          double     mean obliquity (Note 2)
4111     *     @param dpsi          double     nutation in longitude (Note 3)
4112     *
4113     * <!-- Returned (function value): -->
4114     *  @return double    equation of the equinoxes (Note 4)
4115     *
4116     * <p>Notes:
4117     * <ol>
4118     *
4119     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
4120     *     convenient way between the two arguments.  For example,
4121     *     JD(TT)=2450123.7 could be expressed in any of these ways,
4122     *     among others:
4123     *<pre>
4124     *            date1          date2
4125     *
4126     *         2450123.7           0.0       (JD method)
4127     *         2451545.0       -1421.3       (J2000 method)
4128     *         2400000.5       50123.2       (MJD method)
4129     *         2450123.5           0.2       (date &amp; time method)
4130     *</pre>
4131     *     The JD method is the most natural and convenient to use in
4132     *     cases where the loss of several decimal digits of resolution
4133     *     is acceptable.  The J2000 method is best matched to the way
4134     *     the argument is handled internally and will deliver the
4135     *     optimum resolution.  The MJD method and the date &amp; time methods
4136     *     are both good compromises between resolution and convenience.
4137     *
4138     * <li> The obliquity, in radians, is mean of date.
4139     *
4140     * <li> The result, which is in radians, operates in the following sense:
4141     *
4142     *        Greenwich apparent ST = GMST + equation of the equinoxes
4143     *
4144     * <li> The result is compatible with the IAU 2000 resolutions.  For
4145     *     further details, see IERS Conventions 2003 and Capitaine et al.
4146     *     (2002).
4147     *</ol>
4148     *<p>Called:<ul>
4149     *     <li>{@link #jauEect00} equation of the equinoxes complementary terms
4150     * </ul>
4151     *<p>
4152     *
4153     *    <p>Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
4154     *     implement the IAU 2000 definition of UT1", Astronomy &amp;
4155     *     Astrophysics, 406, 1135-1149 (2003)
4156     *
4157     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
4158     *     IERS Technical Note No. 32, BKG (2004)
4159     *
4160     *@version 2008 May 16
4161     *
4162     *  @since Release 20101201
4163     *
4164     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
4165     */
4166     public static double jauEe00(double date1, double date2, double epsa, double dpsi)
4167     {
4168        double ee;
4169 
4170 
4171     /* Equation of the equinoxes. */
4172        ee = dpsi * cos(epsa) + jauEect00(date1, date2);
4173 
4174        return ee;
4175 
4176         }
4177     
4178 
4179     /**
4180     *  Equation of the equinoxes, compatible with IAU 2000 resolutions.
4181     *
4182     *<p>This function is derived from the International Astronomical Union's
4183     *  SOFA (Standards Of Fundamental Astronomy) software collection.
4184     *
4185     *<p>Status:  support function.
4186     *
4187     *<!-- Given: -->
4188     *     @param date1 double TT as a 2-part Julian Date (Note 1)
4189     *     @param date2 double TT as a 2-part Julian Date (Note 1)
4190     *
4191     * <!-- Returned (function value): -->
4192     *  @return double    equation of the equinoxes (Note 2)
4193     *
4194     * <p>Notes:
4195     * <ol>
4196     *
4197     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
4198     *     convenient way between the two arguments.  For example,
4199     *     JD(TT)=2450123.7 could be expressed in any of these ways,
4200     *     among others:
4201     *<pre>
4202     *            date1          date2
4203     *
4204     *         2450123.7           0.0       (JD method)
4205     *         2451545.0       -1421.3       (J2000 method)
4206     *         2400000.5       50123.2       (MJD method)
4207     *         2450123.5           0.2       (date &amp; time method)
4208     *</pre>
4209     *     The JD method is the most natural and convenient to use in
4210     *     cases where the loss of several decimal digits of resolution
4211     *     is acceptable.  The J2000 method is best matched to the way
4212     *     the argument is handled internally and will deliver the
4213     *     optimum resolution.  The MJD method and the date &amp; time methods
4214     *     are both good compromises between resolution and convenience.
4215     *
4216     * <li> The result, which is in radians, operates in the following sense:
4217     *
4218     *        Greenwich apparent ST = GMST + equation of the equinoxes
4219     *
4220     * <li> The result is compatible with the IAU 2000 resolutions.  For
4221     *     further details, see IERS Conventions 2003 and Capitaine et al.
4222     *     (2002).
4223     *</ol>
4224     *<p>Called:<ul>
4225     *     <li>{@link #jauPr00} IAU 2000 precession adjustments
4226     *     <li>{@link #jauObl80} mean obliquity, IAU 1980
4227     *     <li>{@link #jauNut00a} nutation, IAU 2000A
4228     *     <li>{@link #jauEe00} equation of the equinoxes, IAU 2000
4229     * </ul>
4230     *<p>References:
4231     *
4232     *     <p>Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
4233     *     implement the IAU 2000 definition of UT1", Astronomy &amp;
4234     *     Astrophysics, 406, 1135-1149 (2003).
4235     *
4236     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
4237     *     IERS Technical Note No. 32, BKG (2004).
4238     *
4239     *@version 2008 May 16
4240     *
4241     *  @since Release 20101201
4242     *
4243     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
4244     */
4245     public static double jauEe00a(double date1, double date2)
4246     {
4247        double epsa,  ee;
4248 
4249 
4250     /* IAU 2000 precession-rate adjustments. */
4251        PrecessionDeltaTerms nutd = jauPr00(date1, date2);
4252 
4253     /* Mean obliquity, consistent with IAU 2000 precession-nutation. */
4254        epsa = jauObl80(date1, date2) + nutd.depspr;
4255 
4256     /* Nutation in longitude. */
4257        NutationTerms nut = jauNut00a(date1, date2);
4258 
4259     /* Equation of the equinoxes. */
4260        ee = jauEe00(date1, date2, epsa, nut.dpsi);
4261 
4262        return ee;
4263 
4264         }
4265     
4266 
4267     /**
4268     *  Equation of the equinoxes, compatible with IAU 2000 resolutions but
4269     *  using the truncated nutation model IAU 2000B.
4270     *
4271     *<p>This function is derived from the International Astronomical Union's
4272     *  SOFA (Standards Of Fundamental Astronomy) software collection.
4273     *
4274     *<p>Status:  support function.
4275     *
4276     *<!-- Given: -->
4277     *     @param date1 double TT as a 2-part Julian Date (Note 1)
4278     *     @param date2 double TT as a 2-part Julian Date (Note 1)
4279     *
4280     * <!-- Returned (function value): -->
4281     *  @return double    equation of the equinoxes (Note 2)
4282     *
4283     * <p>Notes:
4284     * <ol>
4285     *
4286     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
4287     *     convenient way between the two arguments.  For example,
4288     *     JD(TT)=2450123.7 could be expressed in any of these ways,
4289     *     among others:
4290     *<pre>
4291     *            date1          date2
4292     *
4293     *         2450123.7           0.0       (JD method)
4294     *         2451545.0       -1421.3       (J2000 method)
4295     *         2400000.5       50123.2       (MJD method)
4296     *         2450123.5           0.2       (date &amp; time method)
4297     *</pre>
4298     *     The JD method is the most natural and convenient to use in
4299     *     cases where the loss of several decimal digits of resolution
4300     *     is acceptable.  The J2000 method is best matched to the way
4301     *     the argument is handled internally and will deliver the
4302     *     optimum resolution.  The MJD method and the date &amp; time methods
4303     *     are both good compromises between resolution and convenience.
4304     *
4305     * <li> The result, which is in radians, operates in the following sense:
4306     *
4307     *        Greenwich apparent ST = GMST + equation of the equinoxes
4308     *
4309     * <li> The result is compatible with the IAU 2000 resolutions except
4310     *     that accuracy has been compromised for the sake of speed.  For
4311     *     further details, see McCarthy &amp; Luzum (2001), IERS Conventions
4312     *     2003 and Capitaine et al. (2003).
4313     *</ol>
4314     *<p>Called:<ul>
4315     *     <li>{@link #jauPr00} IAU 2000 precession adjustments
4316     *     <li>{@link #jauObl80} mean obliquity, IAU 1980
4317     *     <li>{@link #jauNut00b} nutation, IAU 2000B
4318     *     <li>{@link #jauEe00} equation of the equinoxes, IAU 2000
4319     * </ul>
4320     *<p>
4321     *
4322     *    <p>Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
4323     *     implement the IAU 2000 definition of UT1", Astronomy &amp;
4324     *     Astrophysics, 406, 1135-1149 (2003)
4325     *
4326     *     <p>McCarthy, D.D. &amp; Luzum, B.J., "An abridged model of the
4327     *     precession-nutation of the celestial pole", Celestial Mechanics &amp;
4328     *     Dynamical Astronomy, 85, 37-49 (2003)
4329     *
4330     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
4331     *     IERS Technical Note No. 32, BKG (2004)
4332     *
4333     *@version 2008 May 18
4334     *
4335     *  @since Release 20101201
4336     *
4337     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
4338     */
4339     public static  double jauEe00b(double date1, double date2)
4340     {
4341        double  ee;
4342 
4343 
4344     /* IAU 2000 precession-rate adjustments. */
4345        PrecessionDeltaTerms nutd = jauPr00(date1, date2);
4346 
4347     /* Mean obliquity, consistent with IAU 2000 precession-nutation. */
4348        double epsa = jauObl80(date1, date2) + nutd.depspr;
4349 
4350     /* Nutation in longitude. dpsi, deps*/
4351        NutationTerms nut = jauNut00b(date1, date2 );
4352 
4353     /* Equation of the equinoxes. */
4354        ee = jauEe00(date1, date2, epsa, nut.dpsi);
4355 
4356        return ee;
4357 
4358         }
4359  
4360     /**
4361     *  Equation of the equinoxes, compatible with IAU 2000 resolutions and
4362     *  IAU 2006/2000A precession-nutation.
4363     *
4364     *<p>This function is derived from the International Astronomical Union's
4365     *  SOFA (Standards Of Fundamental Astronomy) software collection.
4366     *
4367     *<p>Status:  support function.
4368     *
4369     *<!-- Given: -->
4370     *     @param date1 double TT as a 2-part Julian Date (Note 1)
4371     *     @param date2 double TT as a 2-part Julian Date (Note 1)
4372     *
4373     * <!-- Returned (function value): -->
4374     *  @return double    equation of the equinoxes (Note 2)
4375     *
4376     * <p>Notes:
4377     * <ol>
4378     *
4379     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
4380     *     convenient way between the two arguments.  For example,
4381     *     JD(TT)=2450123.7 could be expressed in any of these ways,
4382     *     among others:
4383     *<pre>
4384     *            date1          date2
4385     *
4386     *         2450123.7           0.0       (JD method)
4387     *         2451545.0       -1421.3       (J2000 method)
4388     *         2400000.5       50123.2       (MJD method)
4389     *         2450123.5           0.2       (date &amp; time method)
4390     *</pre>
4391     *     The JD method is the most natural and convenient to use in
4392     *     cases where the loss of several decimal digits of resolution
4393     *     is acceptable.  The J2000 method is best matched to the way
4394     *     the argument is handled internally and will deliver the
4395     *     optimum resolution.  The MJD method and the date &amp; time methods
4396     *     are both good compromises between resolution and convenience.
4397     *
4398     * <li> The result, which is in radians, operates in the following sense:
4399     *
4400     *        Greenwich apparent ST = GMST + equation of the equinoxes
4401     *</ol>
4402     *<p>Called:<ul>
4403     *     <li>{@link #jauAnpm} normalize angle into range +/- pi
4404     *     <li>{@link #jauGst06a} Greenwich apparent sidereal time, IAU 2006/2000A
4405     *     <li>{@link #jauGmst06} Greenwich mean sidereal time, IAU 2006
4406     * </ul>
4407     *<p>Reference:
4408     *
4409     *     <p>McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003),
4410     *     IERS Technical Note No. 32, BKG
4411     *
4412     *@version 2008 May 18
4413     *
4414     *  @since Release 20101201
4415     *
4416     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
4417     */
4418     public static double jauEe06a(double date1, double date2)
4419     {
4420        double gst06a, gmst06, ee;
4421 
4422 
4423     /* Apparent and mean sidereal times. */
4424        gst06a = jauGst06a(0.0, 0.0, date1, date2);
4425        gmst06 = jauGmst06(0.0, 0.0, date1, date2);
4426 
4427     /* Equation of the equinoxes. */
4428        ee  = jauAnpm(gst06a - gmst06);
4429 
4430        return ee;
4431 
4432         }
4433  
4434     private static class TERM {
4435         final int nfa[];      /* coefficients of l,l',F,D,Om,LVe,LE,pA */
4436         final double s, c;     /* sine and cosine coefficients */
4437         public TERM(int nfa[], double s, double c) {
4438             this.nfa = nfa;
4439             this.s = s;
4440             this.c = c;
4441         }
4442        
4443      } 
4444 
4445 
4446     /**
4447     *  Equation of the equinoxes complementary terms, consistent with
4448     *  IAU 2000 resolutions.
4449     *
4450     *<p>This function is derived from the International Astronomical Union's
4451     *  SOFA (Standards Of Fundamental Astronomy) software collection.
4452     *
4453     *<p>Status:  canonical model.
4454     *
4455     *<!-- Given: -->
4456     *     @param date1 double TT as a 2-part Julian Date (Note 1)
4457     *     @param date2 double TT as a 2-part Julian Date (Note 1)
4458     *
4459     * <!-- Returned (function value): -->
4460     *  @return double   complementary terms (Note 2)
4461     *
4462     * <p>Notes:
4463     * <ol>
4464     *
4465     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
4466     *     convenient way between the two arguments.  For example,
4467     *     JD(TT)=2450123.7 could be expressed in any of these ways,
4468     *     among others:
4469     *<pre>
4470     *            date1          date2
4471     *
4472     *         2450123.7           0.0       (JD method)
4473     *         2451545.0       -1421.3       (J2000 method)
4474     *         2400000.5       50123.2       (MJD method)
4475     *         2450123.5           0.2       (date &amp; time method)
4476     *</pre>
4477     *     The JD method is the most natural and convenient to use in
4478     *     cases where the loss of several decimal digits of resolution
4479     *     is acceptable.  The J2000 method is best matched to the way
4480     *     the argument is handled internally and will deliver the
4481     *     optimum resolution.  The MJD method and the date &amp; time methods
4482     *     are both good compromises between resolution and convenience.
4483     *
4484     * <li> The "complementary terms" are part of the equation of the
4485     *     equinoxes (EE), classically the difference between apparent and
4486     *     mean Sidereal Time:
4487     *
4488     *        GAST = GMST + EE
4489     *
4490     *     with:
4491     *
4492     *        EE = dpsi * cos(eps)
4493     *
4494     *     where dpsi is the nutation in longitude and eps is the obliquity
4495     *     of date.  However, if the rotation of the Earth were constant in
4496     *     an inertial frame the classical formulation would lead to
4497     *     apparent irregularities in the UT1 timescale traceable to side-
4498     *     effects of precession-nutation.  In order to eliminate these
4499     *     effects from UT1, "complementary terms" were introduced in 1994
4500     *     (IAU, 1994) and took effect from 1997 (Capitaine and Gontier,
4501     * <li>:
4502     *
4503     *        GAST = GMST + CT + EE
4504     *
4505     *     By convention, the complementary terms are included as part of
4506     *     the equation of the equinoxes rather than as part of the mean
4507     *     Sidereal Time.  This slightly compromises the "geometrical"
4508     *     interpretation of mean sidereal time but is otherwise
4509     *     inconsequential.
4510     *
4511     *     The present function computes CT in the above expression,
4512     *     compatible with IAU 2000 resolutions (Capitaine et al., 2002, and
4513     *     IERS Conventions 2003).
4514     *</ol>
4515     *<p>Called:<ul>
4516     *     <li>{@link #jauFal03} mean anomaly of the Moon
4517     *     <li>{@link #jauFalp03} mean anomaly of the Sun
4518     *     <li>{@link #jauFaf03} mean argument of the latitude of the Moon
4519     *     <li>{@link #jauFad03} mean elongation of the Moon from the Sun
4520     *     <li>{@link #jauFaom03} mean longitude of the Moon's ascending node
4521     *     <li>{@link #jauFave03} mean longitude of Venus
4522     *     <li>{@link #jauFae03} mean longitude of Earth
4523     *     <li>{@link #jauFapa03} general accumulated precession in longitude
4524     * </ul>
4525     *<p>References:
4526     *
4527     *     <p>Capitaine, N. &amp; Gontier, A.-M., Astron. Astrophys., 275,
4528     *     645-650 (1993)
4529     *
4530     *     <p>Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
4531     *     implement the IAU 2000 definition of UT1", Astronomy &amp;
4532     *     Astrophysics, 406, 1135-1149 (2003)
4533     *
4534     *     <p>IAU Resolution C7, Recommendation 3 (1994)
4535     *
4536     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
4537     *     IERS Technical Note No. 32, BKG (2004)
4538     *
4539     *@version 2009 December 17
4540     *
4541     *  @since Release 20101201
4542     *
4543     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
4544     */
4545     public static double jauEect00(double date1, double date2)
4546     {
4547     /* Time since J2000.0, in Julian centuries */
4548        double t;
4549 
4550     /* Miscellaneous */
4551        int i, j;
4552        double a, s0, s1;
4553 
4554     /* Fundamental arguments */
4555        double fa[] = new double[14];
4556 
4557     /* Returned value. */
4558        double eect;
4559 
4560     /* ----------------------------------------- */
4561     /* The series for the EE complementary terms */
4562     /* ----------------------------------------- */
4563 
4564 
4565     /* Terms of order t^0 */
4566        final TERM e0[] = {
4567 
4568        /* 1-10 */
4569           new TERM(new int[]{ 0,  0,  0,  0,  1,  0,  0,  0}, 2640.96e-6, -0.39e-6 ),
4570           new TERM(new int[]{ 0,  0,  0,  0,  2,  0,  0,  0},   63.52e-6, -0.02e-6 ),
4571           new TERM(new int[]{ 0,  0,  2, -2,  3,  0,  0,  0},   11.75e-6,  0.01e-6 ),
4572           new TERM(new int[]{ 0,  0,  2, -2,  1,  0,  0,  0},   11.21e-6,  0.01e-6 ),
4573           new TERM(new int[]{ 0,  0,  2, -2,  2,  0,  0,  0},   -4.55e-6,  0.00e-6 ),
4574           new TERM(new int[]{ 0,  0,  2,  0,  3,  0,  0,  0},    2.02e-6,  0.00e-6 ),
4575           new TERM(new int[]{ 0,  0,  2,  0,  1,  0,  0,  0},    1.98e-6,  0.00e-6 ),
4576           new TERM(new int[]{ 0,  0,  0,  0,  3,  0,  0,  0},   -1.72e-6,  0.00e-6 ),
4577           new TERM(new int[]{ 0,  1,  0,  0,  1,  0,  0,  0},   -1.41e-6, -0.01e-6 ),
4578           new TERM(new int[]{ 0,  1,  0,  0, -1,  0,  0,  0},   -1.26e-6, -0.01e-6 ),
4579 
4580        /* 11-20 */
4581           new TERM(new int[]{ 1,  0,  0,  0, -1,  0,  0,  0},   -0.63e-6,  0.00e-6 ),
4582           new TERM(new int[]{ 1,  0,  0,  0,  1,  0,  0,  0},   -0.63e-6,  0.00e-6 ),
4583           new TERM(new int[]{ 0,  1,  2, -2,  3,  0,  0,  0},    0.46e-6,  0.00e-6 ),
4584           new TERM(new int[]{ 0,  1,  2, -2,  1,  0,  0,  0},    0.45e-6,  0.00e-6 ),
4585           new TERM(new int[]{ 0,  0,  4, -4,  4,  0,  0,  0},    0.36e-6,  0.00e-6 ),
4586           new TERM(new int[]{ 0,  0,  1, -1,  1, -8, 12,  0},   -0.24e-6, -0.12e-6 ),
4587           new TERM(new int[]{ 0,  0,  2,  0,  0,  0,  0,  0},    0.32e-6,  0.00e-6 ),
4588           new TERM(new int[]{ 0,  0,  2,  0,  2,  0,  0,  0},    0.28e-6,  0.00e-6 ),
4589           new TERM(new int[]{ 1,  0,  2,  0,  3,  0,  0,  0},    0.27e-6,  0.00e-6 ),
4590           new TERM(new int[]{ 1,  0,  2,  0,  1,  0,  0,  0},    0.26e-6,  0.00e-6 ),
4591 
4592        /* 21-30 */
4593           new TERM(new int[]{ 0,  0,  2, -2,  0,  0,  0,  0},   -0.21e-6,  0.00e-6 ),
4594           new TERM(new int[]{ 0,  1, -2,  2, -3,  0,  0,  0},    0.19e-6,  0.00e-6 ),
4595           new TERM(new int[]{ 0,  1, -2,  2, -1,  0,  0,  0},    0.18e-6,  0.00e-6 ),
4596           new TERM(new int[]{ 0,  0,  0,  0,  0,  8,-13, -1},   -0.10e-6,  0.05e-6 ),
4597           new TERM(new int[]{ 0,  0,  0,  2,  0,  0,  0,  0},    0.15e-6,  0.00e-6 ),
4598           new TERM(new int[]{ 2,  0, -2,  0, -1,  0,  0,  0},   -0.14e-6,  0.00e-6 ),
4599           new TERM(new int[]{ 1,  0,  0, -2,  1,  0,  0,  0},    0.14e-6,  0.00e-6 ),
4600           new TERM(new int[]{ 0,  1,  2, -2,  2,  0,  0,  0},   -0.14e-6,  0.00e-6 ),
4601           new TERM(new int[]{ 1,  0,  0, -2, -1,  0,  0,  0},    0.14e-6,  0.00e-6 ),
4602           new TERM(new int[]{ 0,  0,  4, -2,  4,  0,  0,  0},    0.13e-6,  0.00e-6 ),
4603 
4604        /* 31-33 */
4605           new TERM(new int[]{ 0,  0,  2, -2,  4,  0,  0,  0},   -0.11e-6,  0.00e-6 ),
4606           new TERM(new int[]{ 1,  0, -2,  0, -3,  0,  0,  0},    0.11e-6,  0.00e-6 ),
4607           new TERM(new int[]{ 1,  0, -2,  0, -1,  0,  0,  0},    0.11e-6,  0.00e-6 )
4608        };
4609 
4610     /* Terms of order t^1 */
4611        final TERM e1[] = {
4612           new TERM(new int[]{ 0,  0,  0,  0,  1,  0,  0,  0},    -0.87e-6,  0.00e-6 )
4613        };
4614 
4615     /* Number of terms in the series */
4616        final int NE0 = e0.length;
4617        final int NE1 = e1.length;
4618 
4619     /*--------------------------------------------------------------------*/
4620 
4621     /* Interval between fundamental epoch J2000.0 and current date (JC). */
4622        t = ((date1 - DJ00) + date2) / DJC;
4623 
4624     /* Fundamental Arguments (from IERS Conventions 2003) */
4625 
4626     /* Mean anomaly of the Moon. */
4627        fa[0] = jauFal03(t);
4628 
4629     /* Mean anomaly of the Sun. */
4630        fa[1] = jauFalp03(t);
4631 
4632     /* Mean longitude of the Moon minus that of the ascending node. */
4633        fa[2] = jauFaf03(t);
4634 
4635     /* Mean elongation of the Moon from the Sun. */
4636        fa[3] = jauFad03(t);
4637 
4638     /* Mean longitude of the ascending node of the Moon. */
4639        fa[4] = jauFaom03(t);
4640 
4641     /* Mean longitude of Venus. */
4642        fa[5] = jauFave03(t);
4643 
4644     /* Mean longitude of Earth. */
4645        fa[6] = jauFae03(t);
4646 
4647     /* General precession in longitude. */
4648        fa[7] = jauFapa03(t);
4649 
4650     /* Evaluate the EE complementary terms. */
4651        s0 = 0.0;
4652        s1 = 0.0;
4653 
4654        for (i = NE0-1; i >= 0; i--) {
4655           a = 0.0;
4656           for (j = 0; j < 8; j++) {
4657              a += (double)(e0[i].nfa[j]) * fa[j];
4658           }
4659           s0 += e0[i].s * sin(a) + e0[i].c * cos(a);
4660        }
4661 
4662        for (i = NE1-1; i >= 0; i--) {
4663           a = 0.0;
4664           for (j = 0; j < 8; j++) {
4665              a += (double)(e1[i].nfa[j]) * fa[j];
4666           }
4667           s1 += e1[i].s * sin(a) + e1[i].c * cos(a);
4668        }
4669 
4670        eect = (s0 + s1 * t ) * DAS2R;
4671 
4672        return eect;
4673 
4674         }
4675     
4676     /**
4677      * Reference Ellipsoid of Earth.
4678      * 
4679      * The ellipsoid parameters are returned in the form of equatorial
4680     *     radius in meters (a) and flattening (f).  The latter is a number
4681     *     around 0.00335, i.e. around 1/298.
4682     *
4683      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 1 Feb 2010
4684      * 
4685      * @since AIDA Stage 1
4686      */
4687     public static class ReferenceEllipsoid{
4688         /** equatorial radius (meters, Note 2) */
4689         public double a; 
4690         /** flattening (Note 2) */
4691         public double f ;
4692         public ReferenceEllipsoid(double a, double f ) {
4693             this.a = a;
4694             this.f = f;
4695         }
4696     }
4697     /**
4698     *  Earth reference ellipsoids.
4699     *
4700     *<p>This function is derived from the International Astronomical Union's
4701     *  JSOFA (Standards of Fundamental Astronomy) software collection.
4702     *
4703     *<p>Status:  canonical.
4704     *
4705     *<!-- Given: -->
4706     *     @param n        int       ellipsoid identifier (Note 1)
4707     *
4708     *<!-- Returned: -->
4709     *     @return  a        double     <u>returned</u> equatorial radius (meters, Note 2)
4710     *              f        double     <u>returned</u> flattening (Note 2)
4711     *
4712     * <!-- Returned (function value): -->
4713     *  @throws JSOFAIllegalParameter
4714     *                     int       status:
4715     *                          0 = OK
4716     *                         -1 = illegal identifier (Note 3)
4717     *
4718     * <p>Notes:
4719     * <ol>
4720     *
4721     * <li> The identifier n is a number that specifies the choice of
4722     *     reference ellipsoid.  The following are supported:
4723     *
4724     *        n   ellipsoid
4725     *
4726     *        1    WGS84
4727     *        2    GRS80
4728     *        3    WGS72
4729     *
4730     *     The number n has no significance outside the JSOFA software.
4731     *
4732     * <li> The ellipsoid parameters are returned in the form of equatorial
4733     *     radius in meters (a) and flattening (f).  The latter is a number
4734     *     around 0.00335, i.e. around 1/298.
4735     *
4736     * <li> For the case where an unsupported n value is supplied, zero a and
4737     *     f are returned, as well as error status.
4738     *</ol>
4739     *<p>References:
4740     *
4741     *     <p>Department of Defense World Geodetic System 1984, National
4742     *     Imagery and Mapping Agency Technical Report 8350.2, Third
4743     *     Edition, p3-2.
4744     *
4745     *     <p>Moritz, H., Bull. Geodesique 66-2, 187 (1992).
4746     *
4747     *     <p>The Department of Defense World Geodetic System 1972, World
4748     *     Geodetic System Committee, May 1974.
4749     *
4750     *     <p>Explanatory Supplement to the Astronomical Almanac,
4751     *     P. Kenneth Seidelmann (ed), University Science Books (1992),
4752     *     p220.
4753     *
4754     *@version 2010 January 18
4755     *
4756     *  @since Release 20101201
4757     *
4758     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
4759     */
4760     public static  ReferenceEllipsoid jauEform ( int n ) throws JSOFAIllegalParameter
4761     {
4762       double a,f;
4763     /* Look up a and f for the specified reference ellipsoid. */
4764        switch ( n ) {
4765        case 1:
4766 
4767        /* WGS84. */
4768           a = 6378137.0;
4769           f = 1.0 / 298.257223563;
4770           break;
4771 
4772        case 2:
4773 
4774        /* GRS80. */
4775           a = 6378137.0;
4776           f = 1.0 / 298.257222101;
4777           break;
4778 
4779        case 3:
4780 
4781        /* WGS72. */
4782           a = 6378135.0;
4783           f = 1.0 / 298.26;
4784           break;
4785 
4786        default:
4787 
4788        /* Invalid identifier. */
4789           a = 0.0;
4790           f = 0.0;
4791           throw new JSOFAIllegalParameter("illegal ellipsoid identifier", -1);
4792 
4793        }
4794 
4795     /* OK status. */
4796        return new ReferenceEllipsoid(a, f);
4797 
4798     
4799     }
4800     
4801 
4802     /**
4803     *  Equation of the origins, IAU 2006 precession and IAU 2000A nutation.
4804     *
4805     *<p>This function is derived from the International Astronomical Union's
4806     *  SOFA (Standards Of Fundamental Astronomy) software collection.
4807     *
4808     *<p>Status:  support function.
4809     *
4810     *<!-- Given: -->
4811     *     @param date1 double TT as a 2-part Julian Date (Note 1)
4812     *     @param date2 double TT as a 2-part Julian Date (Note 1)
4813     *
4814     * <!-- Returned (function value): -->
4815     *  @return double    equation of the origins in radians
4816     *
4817     * <p>Notes:
4818     * <ol>
4819     *
4820     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
4821     *     convenient way between the two arguments.  For example,
4822     *     JD(TT)=2450123.7 could be expressed in any of these ways,
4823     *     among others:
4824     *<pre>
4825     *            date1          date2
4826     *
4827     *         2450123.7           0.0       (JD method)
4828     *         2451545.0       -1421.3       (J2000 method)
4829     *         2400000.5       50123.2       (MJD method)
4830     *         2450123.5           0.2       (date &amp; time method)
4831     *</pre>
4832     *     The JD method is the most natural and convenient to use in
4833     *     cases where the loss of several decimal digits of resolution
4834     *     is acceptable.  The J2000 method is best matched to the way
4835     *     the argument is handled internally and will deliver the
4836     *     optimum resolution.  The MJD method and the date &amp; time methods
4837     *     are both good compromises between resolution and convenience.
4838     *
4839     * <li> The equation of the origins is the distance between the true
4840     *     equinox and the celestial intermediate origin and, equivalently,
4841     *     the difference between Earth rotation angle and Greenwich
4842     *     apparent sidereal time (ERA-GST).  It comprises the precession
4843     *     (since J2000.0) in right ascension plus the equation of the
4844     *     equinoxes (including the small correction terms).
4845     *</ol>
4846     *<p>Called:<ul>
4847     *     <li>{@link #jauPnm06a} classical NPB matrix, IAU 2006/2000A
4848     *     <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
4849     *     <li>{@link #jauS06} the CIO locator s, given X,Y, IAU 2006
4850     *     <li>{@link #jauEors} equation of the origins, Given NPB matrix and s
4851     * </ul>
4852     *<p>References:
4853     *
4854     *     <p>Capitaine, N. &amp; Wallace, P.T., 2006, Astron.Astrophys. 450, 855
4855     *
4856     *     <p>Wallace, P.T. &amp; Capitaine, N., 2006, Astron.Astrophys. 459, 981
4857     *
4858     *@version 2008 May 16
4859     *
4860     *  @since Release 20101201
4861     *
4862     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
4863     */
4864     public static double jauEo06a(double date1, double date2)
4865     {
4866        double r[][], s, eo;
4867 
4868 
4869     /* Classical nutation x precession x bias matrix. */
4870        r = jauPnm06a(date1, date2);
4871 
4872     /* Extract CIP coordinates. */
4873        CelestialIntermediatePole cip = jauBpn2xy(r);
4874 
4875     /* The CIO locator, s. */
4876        s = jauS06(date1, date2, cip.x, cip.y);
4877 
4878     /* Solve for the EO. */
4879        eo = jauEors(r, s);
4880 
4881        return eo;
4882 
4883         }
4884     
4885 
4886     /**
4887     *  Equation of the origins, given the classical NPB matrix and the
4888     *  quantity s.
4889     *
4890     *<p>This function is derived from the International Astronomical Union's
4891     *  SOFA (Standards Of Fundamental Astronomy) software collection.
4892     *
4893     *<p>Status:  support function.
4894     *
4895     *<!-- Given: -->
4896     *     @param rnpb   double[3][3]   classical nutation x precession x bias matrix
4897     *     @param s      double         the quantity s (the CIO locator)
4898     *
4899     * <!-- Returned (function value): -->
4900     *  @return double        the equation of the origins in radians.
4901     *
4902     * <p>Notes:
4903     * <ol>
4904     *
4905     * <li>  The equation of the origins is the distance between the true
4906     *      equinox and the celestial intermediate origin and, equivalently,
4907     *      the difference between Earth rotation angle and Greenwich
4908     *      apparent sidereal time (ERA-GST).  It comprises the precession
4909     *      (since J2000.0) in right ascension plus the equation of the
4910     *      equinoxes (including the small correction terms).
4911     *
4912     * <li>  The algorithm is from Wallace &amp; Capitaine (2006).
4913     *</ol>
4914     * References:
4915     *
4916     *    <p>Capitaine, N. &amp; Wallace, P.T., 2006, Astron.Astrophys. 450, 855
4917     *
4918     *    <p>Wallace, P. &amp; Capitaine, N., 2006, Astron.Astrophys. 459, 981
4919     *
4920     *@version 2008 May 26
4921     *
4922     *  @since Release 20101201
4923     *
4924     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
4925     */
4926     public static double jauEors(double rnpb[][], double s)
4927     {
4928        double x, ax, xs, ys, zs, p, q, eo;
4929 
4930 
4931     /* Evaluate Wallace &amp; Capitaine (2006) expression (16). */
4932        x = rnpb[2][0];
4933        ax = x / (1.0 + rnpb[2][2]);
4934        xs = 1.0 - ax * x;
4935        ys = -ax * rnpb[2][1];
4936        zs = -x;
4937        p = rnpb[0][0] * xs + rnpb[0][1] * ys + rnpb[0][2] * zs;
4938        q = rnpb[1][0] * xs + rnpb[1][1] * ys + rnpb[1][2] * zs;
4939        eo = ((p != 0) || (q != 0)) ? s - atan2(q, p) : s;
4940 
4941        return eo;
4942 
4943         }
4944     
4945 
4946     /**
4947     *  Julian Date to Besselian Epoch.
4948     *
4949     *<p>This function is derived from the International Astronomical Union's
4950     *  SOFA (Standards Of Fundamental Astronomy) software collection.
4951     *
4952     *<p>Status:  support function.
4953     *
4954     *<!-- Given: -->
4955     *     @param dj1 double      Julian Date (see note)
4956     *     @param dj2 double      Julian Date (see note) 
4957     *
4958     * <!-- Returned (function value): -->
4959     *  @return double     Besselian Epoch.
4960     *
4961     *  Note:
4962     *
4963     *     The Julian Date is supplied in two pieces, in the usual JSOFA
4964     *     manner, which is designed to preserve time resolution.  The
4965     *     Julian Date is available as a single number by adding dj1 and
4966     *     dj2.  The maximum resolution is achieved if dj1 is 2451545D0
4967     *     (J2000.0).
4968     *
4969     *<p>Reference:
4970     *
4971     *     Lieske,J.H., 1979. Astron.Astrophys.,73,282.
4972     *
4973     *@version 2009 December 16
4974     *
4975     *  @since Release 20101201
4976     *
4977     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
4978     */
4979     public static double jauEpb(double dj1, double dj2)
4980     {
4981     /* J2000.0 minus B1900.0 (2415019.81352) in Julian days */
4982        final double D1900 = 36524.68648;
4983 
4984        return 1900.0 + ((dj1 - DJ00) + (dj2 + D1900)) / DTY;
4985 
4986         }
4987     
4988     /**
4989     *  Besselian Epoch to Julian Date.
4990     *
4991     *<p>This function is derived from the International Astronomical Union's
4992     *  SOFA (Standards Of Fundamental Astronomy) software collection.
4993     *
4994     *<p>Status:  support function.
4995     *
4996     *<!-- Given: -->
4997     *     @param epb       double     Besselian Epoch (e.g. 1957.3D0)
4998     *
4999     *<!-- Returned: -->
5000     *     @return  MJD zero-point: always 2400000.5  Modified Julian Date
5001     *
5002     *  Note:
5003     *
5004     *     The Julian Date is returned in two pieces, in the usual JSOFA
5005     *     manner, which is designed to preserve time resolution.  The
5006     *     Julian Date is available as a single number by adding djm0 and
5007     *     djm.
5008     *
5009     *<p>Reference:
5010     *
5011     *     <p>Lieske, J.H., 1979, Astron.Astrophys. 73, 282.
5012     *
5013     *@version 2008 May 24
5014     *
5015     *  @since Release 20101201
5016     *
5017     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
5018     */
5019     public static JulianDate jauEpb2jd(double epb)
5020     {
5021         double djm0, djm;
5022        djm0 = 2400000.5;
5023        djm  =   15019.81352 + (epb - 1900.0) * DTY;
5024 
5025        return new JulianDate(djm0, djm);
5026 
5027         }
5028     
5029 
5030     /**
5031     *  Julian Date to Julian Epoch.
5032     *
5033     *<p>This function is derived from the International Astronomical Union's
5034     *  SOFA (Standards Of Fundamental Astronomy) software collection.
5035     *
5036     *<p>Status:  support function.
5037     *
5038     *<!-- Given: -->
5039     *     @param dj1 double      Julian Date (see note)
5040     *     @param dj2 double      Julian Date (see note) 
5041     *
5042     * <!-- Returned (function value): -->
5043     *  @return double     Julian Epoch
5044     *
5045     *  Note:
5046     *
5047     *     The Julian Date is supplied in two pieces, in the usual JSOFA
5048     *     manner, which is designed to preserve time resolution.  The
5049     *     Julian Date is available as a single number by adding dj1 and
5050     *     dj2.  The maximum resolution is achieved if dj1 is 2451545D0
5051     *     (J2000.0).
5052     *
5053     *<p>Reference:
5054     *
5055     *     <p>Lieske, J.H., 1979, Astron.Astrophys. 73, 282.
5056     *
5057     *@version 2009 December 16
5058     *
5059     *  @since Release 20101201
5060     *
5061     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
5062     */
5063     public static double jauEpj(double dj1, double dj2)
5064     {
5065        return 2000.0 + ((dj1 - DJ00) + dj2) / DJY;
5066 
5067      }
5068     
5069 
5070     /**
5071     *  Julian Epoch to Julian Date.
5072     *
5073     *<p>This function is derived from the International Astronomical Union's
5074     *  SOFA (Standards Of Fundamental Astronomy) software collection.
5075     *
5076     *<p>Status:  support function.
5077     *
5078     *<!-- Given: -->
5079     *     @param epj       double     Julian Epoch (e.g. 1996.8D0)
5080     *
5081     *<!-- Returned: -->
5082     *     @return  MJD zero-point: always 2400000.5  Modified Julian Date
5083     *
5084     *  Note:
5085     *
5086     *     The Julian Date is returned in two pieces, in the usual JSOFA
5087     *     manner, which is designed to preserve time resolution.  The
5088     *     Julian Date is available as a single number by adding djm0 and
5089     *     djm.
5090     *
5091     *<p>Reference:
5092     *
5093     *     <p>Lieske, J.H., 1979, Astron.Astrophys. 73, 282.
5094     *
5095     *@version 2008 May 11
5096     *
5097     *  @since Release 20101201
5098     *
5099     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
5100     */
5101     public static JulianDate jauEpj2jd(double epj)
5102     {
5103        double djm0, djm;
5104        djm0 = 2400000.5;
5105        djm  =   51544.5 + (epj - 2000.0) * 365.25;
5106 
5107        return new JulianDate(djm0, djm);
5108 
5109         }
5110     
5111 
5112     /*
5113      * A utility class to get round 65536 byte limit on functions in java - The static initializer is too large on its own. - So split into two classes for no real semantic reason
5114      */        
5115     static private final class Ephemeris extends SSB {
5116        
5117 
5118     /**
5119     * ----------------------
5120     * Ephemeris Coefficients
5121     * ----------------------
5122     *
5123     * The ephemeris consists of harmonic terms for predicting (i) the Sun
5124     * to Earth vector and (ii) the Solar-System-barycenter to Sun vector
5125     * respectively.  The coefficients are stored in arrays which, although
5126     * 1-demensional, contain groups of three.  Each triplet of
5127     * coefficients is the amplitude, phase and frequency for one term in
5128     * the model, and each array contains the number of terms called for by
5129     * the model.
5130     *
5131     * There are eighteen such arrays, named as follows:
5132     *<pre>
5133     *     array         model      power of T      component
5134     *
5135     *      e0x      Sun-to-Earth        0              x
5136     *      e0y      Sun-to-Earth        0              y
5137     *      e0z      Sun-to-Earth        0              z
5138     *
5139     *      e1x      Sun-to-Earth        1              x
5140     *      e1y      Sun-to-Earth        1              y
5141     *      e1z      Sun-to-Earth        1              z
5142     *
5143     *      e2x      Sun-to-Earth        2              x
5144     *      e2y      Sun-to-Earth        2              y
5145     *      e2z      Sun-to-Earth        2              z
5146     *
5147     *      s0x      SSB-to-Sun          0              x
5148     *      s0y      SSB-to-Sun          0              y
5149     *      s0z      SSB-to-Sun          0              z
5150     *
5151     *      s1x      SSB-to-Sun          1              x
5152     *      s1y      SSB-to-Sun          1              y
5153     *      s1z      SSB-to-Sun          1              z
5154     *
5155     *      s2x      SSB-to-Sun          2              x
5156     *      s2y      SSB-to-Sun          2              y
5157     *      s2z      SSB-to-Sun          2              z
5158     *<pre>
5159     */
5160 
5161     /* Sun-to-Earth, T^0, X */
5162       static final double e0x[] = {
5163           0.9998292878132e+00, 0.1753485171504e+01, 0.6283075850446e+01,
5164           0.8352579567414e-02, 0.1710344404582e+01, 0.1256615170089e+02,
5165           0.5611445335148e-02, 0.0000000000000e+00, 0.0000000000000e+00,
5166           0.1046664295572e-03, 0.1667225416770e+01, 0.1884922755134e+02,
5167           0.3110842534677e-04, 0.6687513390251e+00, 0.8399684731857e+02,
5168           0.2552413503550e-04, 0.5830637358413e+00, 0.5296909721118e+00,
5169           0.2137207845781e-04, 0.1092330954011e+01, 0.1577343543434e+01,
5170           0.1680240182951e-04, 0.4955366134987e+00, 0.6279552690824e+01,
5171           0.1679012370795e-04, 0.6153014091901e+01, 0.6286599010068e+01,
5172           0.1445526946777e-04, 0.3472744100492e+01, 0.2352866153506e+01,
5173 
5174           0.1091038246184e-04, 0.3689845786119e+01, 0.5223693906222e+01,
5175           0.9344399733932e-05, 0.6073934645672e+01, 0.1203646072878e+02,
5176           0.8993182910652e-05, 0.3175705249069e+01, 0.1021328554739e+02,
5177           0.5665546034116e-05, 0.2152484672246e+01, 0.1059381944224e+01,
5178           0.6844146703035e-05, 0.1306964099750e+01, 0.5753384878334e+01,
5179           0.7346610905565e-05, 0.4354980070466e+01, 0.3981490189893e+00,
5180           0.6815396474414e-05, 0.2218229211267e+01, 0.4705732307012e+01,
5181           0.6112787253053e-05, 0.5384788425458e+01, 0.6812766822558e+01,
5182           0.4518120711239e-05, 0.6087604012291e+01, 0.5884926831456e+01,
5183           0.4521963430706e-05, 0.1279424524906e+01, 0.6256777527156e+01,
5184 
5185           0.4497426764085e-05, 0.5369129144266e+01, 0.6309374173736e+01,
5186           0.4062190566959e-05, 0.5436473303367e+00, 0.6681224869435e+01,
5187           0.5412193480192e-05, 0.7867838528395e+00, 0.7755226100720e+00,
5188           0.5469839049386e-05, 0.1461440311134e+01, 0.1414349524433e+02,
5189           0.5205264083477e-05, 0.4432944696116e+01, 0.7860419393880e+01,
5190           0.2149759935455e-05, 0.4502237496846e+01, 0.1150676975667e+02,
5191           0.2279109618501e-05, 0.1239441308815e+01, 0.7058598460518e+01,
5192           0.2259282939683e-05, 0.3272430985331e+01, 0.4694002934110e+01,
5193           0.2558950271319e-05, 0.2265471086404e+01, 0.1216800268190e+02,
5194           0.2561581447555e-05, 0.1454740653245e+01, 0.7099330490126e+00,
5195 
5196           0.1781441115440e-05, 0.2962068630206e+01, 0.7962980379786e+00,
5197           0.1612005874644e-05, 0.1473255041006e+01, 0.5486777812467e+01,
5198           0.1818630667105e-05, 0.3743903293447e+00, 0.6283008715021e+01,
5199           0.1818601377529e-05, 0.6274174354554e+01, 0.6283142985870e+01,
5200           0.1554475925257e-05, 0.1624110906816e+01, 0.2513230340178e+02,
5201           0.2090948029241e-05, 0.5852052276256e+01, 0.1179062909082e+02,
5202           0.2000176345460e-05, 0.4072093298513e+01, 0.1778984560711e+02,
5203           0.1289535917759e-05, 0.5217019331069e+01, 0.7079373888424e+01,
5204           0.1281135307881e-05, 0.4802054538934e+01, 0.3738761453707e+01,
5205           0.1518229005692e-05, 0.8691914742502e+00, 0.2132990797783e+00,
5206 
5207           0.9450128579027e-06, 0.4601859529950e+01, 0.1097707878456e+02,
5208           0.7781119494996e-06, 0.1844352816694e+01, 0.8827390247185e+01,
5209           0.7733407759912e-06, 0.3582790154750e+01, 0.5507553240374e+01,
5210           0.7350644318120e-06, 0.2695277788230e+01, 0.1589072916335e+01,
5211           0.6535928827023e-06, 0.3651327986142e+01, 0.1176985366291e+02,
5212           0.6324624183656e-06, 0.2241302375862e+01, 0.6262300422539e+01,
5213           0.6298565300557e-06, 0.4407122406081e+01, 0.6303851278352e+01,
5214           0.8587037089179e-06, 0.3024307223119e+01, 0.1672837615881e+03,
5215           0.8299954491035e-06, 0.6192539428237e+01, 0.3340612434717e+01,
5216           0.6311263503401e-06, 0.2014758795416e+01, 0.7113454667900e-02,
5217 
5218           0.6005646745452e-06, 0.3399500503397e+01, 0.4136910472696e+01,
5219           0.7917715109929e-06, 0.2493386877837e+01, 0.6069776770667e+01,
5220           0.7556958099685e-06, 0.4159491740143e+01, 0.6496374930224e+01,
5221           0.6773228244949e-06, 0.4034162934230e+01, 0.9437762937313e+01,
5222           0.5370708577847e-06, 0.1562219163734e+01, 0.1194447056968e+01,
5223           0.5710804266203e-06, 0.2662730803386e+01, 0.6282095334605e+01,
5224           0.5709824583726e-06, 0.3985828430833e+01, 0.6284056366286e+01,
5225           0.5143950896447e-06, 0.1308144688689e+01, 0.6290189305114e+01,
5226           0.5088010604546e-06, 0.5352817214804e+01, 0.6275962395778e+01,
5227           0.4960369085172e-06, 0.2644267922349e+01, 0.6127655567643e+01,
5228 
5229           0.4803137891183e-06, 0.4008844192080e+01, 0.6438496133249e+01,
5230           0.5731747768225e-06, 0.3794550174597e+01, 0.3154687086868e+01,
5231           0.4735947960579e-06, 0.6107118308982e+01, 0.3128388763578e+01,
5232           0.4808348796625e-06, 0.4771458618163e+01, 0.8018209333619e+00,
5233           0.4115073743137e-06, 0.3327111335159e+01, 0.8429241228195e+01,
5234           0.5230575889287e-06, 0.5305708551694e+01, 0.1336797263425e+02,
5235           0.5133977889215e-06, 0.5784230738814e+01, 0.1235285262111e+02,
5236           0.5065815825327e-06, 0.2052064793679e+01, 0.1185621865188e+02,
5237           0.4339831593868e-06, 0.3644994195830e+01, 0.1726015463500e+02,
5238           0.3952928638953e-06, 0.4930376436758e+01, 0.5481254917084e+01,
5239 
5240           0.4898498111942e-06, 0.4542084219731e+00, 0.9225539266174e+01,
5241           0.4757490209328e-06, 0.3161126388878e+01, 0.5856477690889e+01,
5242           0.4727701669749e-06, 0.6214993845446e+00, 0.2544314396739e+01,
5243           0.3800966681863e-06, 0.3040132339297e+01, 0.4265981595566e+00,
5244           0.3257301077939e-06, 0.8064977360087e+00, 0.3930209696940e+01,
5245           0.3255810528674e-06, 0.1974147981034e+01, 0.2146165377750e+01,
5246           0.3252029748187e-06, 0.2845924913135e+01, 0.4164311961999e+01,
5247           0.3255505635308e-06, 0.3017900824120e+01, 0.5088628793478e+01,
5248           0.2801345211990e-06, 0.6109717793179e+01, 0.1256967486051e+02,
5249           0.3688987740970e-06, 0.2911550235289e+01, 0.1807370494127e+02,
5250 
5251           0.2475153429458e-06, 0.2179146025856e+01, 0.2629832328990e-01,
5252           0.3033457749150e-06, 0.1994161050744e+01, 0.4535059491685e+01,
5253           0.2186743763110e-06, 0.5125687237936e+01, 0.1137170464392e+02,
5254           0.2764777032774e-06, 0.4822646860252e+00, 0.1256262854127e+02,
5255           0.2199028768592e-06, 0.4637633293831e+01, 0.1255903824622e+02,
5256           0.2046482824760e-06, 0.1467038733093e+01, 0.7084896783808e+01,
5257           0.2611209147507e-06, 0.3044718783485e+00, 0.7143069561767e+02,
5258           0.2286079656818e-06, 0.4764220356805e+01, 0.8031092209206e+01,
5259           0.1855071202587e-06, 0.3383637774428e+01, 0.1748016358760e+01,
5260           0.2324669506784e-06, 0.6189088449251e+01, 0.1831953657923e+02,
5261 
5262           0.1709528015688e-06, 0.5874966729774e+00, 0.4933208510675e+01,
5263           0.2168156875828e-06, 0.4302994009132e+01, 0.1044738781244e+02,
5264           0.2106675556535e-06, 0.3800475419891e+01, 0.7477522907414e+01,
5265           0.1430213830465e-06, 0.1294660846502e+01, 0.2942463415728e+01,
5266           0.1388396901944e-06, 0.4594797202114e+01, 0.8635942003952e+01,
5267           0.1922258844190e-06, 0.4943044543591e+00, 0.1729818233119e+02,
5268           0.1888460058292e-06, 0.2426943912028e+01, 0.1561374759853e+03,
5269           0.1789449386107e-06, 0.1582973303499e+00, 0.1592596075957e+01,
5270           0.1360803685374e-06, 0.5197240440504e+01, 0.1309584267300e+02,
5271           0.1504038014709e-06, 0.3120360916217e+01, 0.1649636139783e+02,
5272 
5273           0.1382769533389e-06, 0.6164702888205e+01, 0.7632943190217e+01,
5274           0.1438059769079e-06, 0.1437423770979e+01, 0.2042657109477e+02,
5275           0.1326303260037e-06, 0.3609688799679e+01, 0.1213955354133e+02,
5276           0.1159244950540e-06, 0.5463018167225e+01, 0.5331357529664e+01,
5277           0.1433118149136e-06, 0.6028909912097e+01, 0.7342457794669e+01,
5278           0.1234623148594e-06, 0.3109645574997e+01, 0.6279485555400e+01,
5279           0.1233949875344e-06, 0.3539359332866e+01, 0.6286666145492e+01,
5280           0.9927196061299e-07, 0.1259321569772e+01, 0.7234794171227e+01,
5281           0.1242302191316e-06, 0.1065949392609e+01, 0.1511046609763e+02,
5282           0.1098402195201e-06, 0.2192508743837e+01, 0.1098880815746e+02,
5283 
5284           0.1158191395315e-06, 0.4054411278650e+01, 0.5729506548653e+01,
5285           0.9048475596241e-07, 0.5429764748518e+01, 0.9623688285163e+01,
5286           0.8889853269023e-07, 0.5046586206575e+01, 0.6148010737701e+01,
5287           0.1048694242164e-06, 0.2628858030806e+01, 0.6836645152238e+01,
5288           0.1112308378646e-06, 0.4177292719907e+01, 0.1572083878776e+02,
5289           0.8631729709901e-07, 0.1601345232557e+01, 0.6418140963190e+01,
5290           0.8527816951664e-07, 0.2463888997513e+01, 0.1471231707864e+02,
5291           0.7892139456991e-07, 0.3154022088718e+01, 0.2118763888447e+01,
5292           0.1051782905236e-06, 0.4795035816088e+01, 0.1349867339771e+01,
5293           0.1048219943164e-06, 0.2952983395230e+01, 0.5999216516294e+01,
5294 
5295           0.7435760775143e-07, 0.5420547991464e+01, 0.6040347114260e+01,
5296           0.9869574106949e-07, 0.3695646753667e+01, 0.6566935184597e+01,
5297           0.9156886364226e-07, 0.3922675306609e+01, 0.5643178611111e+01,
5298           0.7006834356188e-07, 0.1233968624861e+01, 0.6525804586632e+01,
5299           0.9806170182601e-07, 0.1919542280684e+01, 0.2122839202813e+02,
5300           0.9052289673607e-07, 0.4615902724369e+01, 0.4690479774488e+01,
5301           0.7554200867893e-07, 0.1236863719072e+01, 0.1253985337760e+02,
5302           0.8215741286498e-07, 0.3286800101559e+00, 0.1097355562493e+02,
5303           0.7185178575397e-07, 0.5880942158367e+01, 0.6245048154254e+01,
5304           0.7130726476180e-07, 0.7674871987661e+00, 0.6321103546637e+01,
5305 
5306           0.6650894461162e-07, 0.6987129150116e+00, 0.5327476111629e+01,
5307           0.7396888823688e-07, 0.3576824794443e+01, 0.5368044267797e+00,
5308           0.7420588884775e-07, 0.5033615245369e+01, 0.2354323048545e+02,
5309           0.6141181642908e-07, 0.9449927045673e+00, 0.1296430071988e+02,
5310           0.6373557924058e-07, 0.6206342280341e+01, 0.9517183207817e+00,
5311           0.6359474329261e-07, 0.5036079095757e+01, 0.1990745094947e+01,
5312           0.5740173582646e-07, 0.6105106371350e+01, 0.9555997388169e+00,
5313           0.7019864084602e-07, 0.7237747359018e+00, 0.5225775174439e+00,
5314           0.6398054487042e-07, 0.3976367969666e+01, 0.2407292145756e+02,
5315           0.7797092650498e-07, 0.4305423910623e+01, 0.2200391463820e+02,
5316 
5317           0.6466760000900e-07, 0.3500136825200e+01, 0.5230807360890e+01,
5318           0.7529417043890e-07, 0.3514779246100e+01, 0.1842262939178e+02,
5319           0.6924571140892e-07, 0.2743457928679e+01, 0.1554202828031e+00,
5320           0.6220798650222e-07, 0.2242598118209e+01, 0.1845107853235e+02,
5321           0.5870209391853e-07, 0.2332832707527e+01, 0.6398972393349e+00,
5322           0.6263953473888e-07, 0.2191105358956e+01, 0.6277552955062e+01,
5323           0.6257781390012e-07, 0.4457559396698e+01, 0.6288598745829e+01,
5324           0.5697304945123e-07, 0.3499234761404e+01, 0.1551045220144e+01,
5325           0.6335438746791e-07, 0.6441691079251e+00, 0.5216580451554e+01,
5326           0.6377258441152e-07, 0.2252599151092e+01, 0.5650292065779e+01,
5327 
5328           0.6484841818165e-07, 0.1992812417646e+01, 0.1030928125552e+00,
5329           0.4735551485250e-07, 0.3744672082942e+01, 0.1431416805965e+02,
5330           0.4628595996170e-07, 0.1334226211745e+01, 0.5535693017924e+00,
5331           0.6258152336933e-07, 0.4395836159154e+01, 0.2608790314060e+02,
5332           0.6196171366594e-07, 0.2587043007997e+01, 0.8467247584405e+02,
5333           0.6159556952126e-07, 0.4782499769128e+01, 0.2394243902548e+03,
5334           0.4987741172394e-07, 0.7312257619924e+00, 0.7771377146812e+02,
5335           0.5459280703142e-07, 0.3001376372532e+01, 0.6179983037890e+01,
5336           0.4863461189999e-07, 0.3767222128541e+01, 0.9027992316901e+02,
5337           0.5349912093158e-07, 0.3663594450273e+01, 0.6386168663001e+01,
5338 
5339           0.5673725607806e-07, 0.4331187919049e+01, 0.6915859635113e+01,
5340           0.4745485060512e-07, 0.5816195745518e+01, 0.6282970628506e+01,
5341           0.4745379005326e-07, 0.8323672435672e+00, 0.6283181072386e+01,
5342           0.4049002796321e-07, 0.3785023976293e+01, 0.6254626709878e+01,
5343           0.4247084014515e-07, 0.2378220728783e+01, 0.7875671926403e+01,
5344           0.4026912363055e-07, 0.2864103423269e+01, 0.6311524991013e+01,
5345           0.4062935011774e-07, 0.2415408595975e+01, 0.3634620989887e+01,
5346           0.5347771048509e-07, 0.3343479309801e+01, 0.2515860172507e+02,
5347           0.4829494136505e-07, 0.2821742398262e+01, 0.5760498333002e+01,
5348           0.4342554404599e-07, 0.5624662458712e+01, 0.7238675589263e+01,
5349 
5350           0.4021599184361e-07, 0.5557250275009e+00, 0.1101510648075e+02,
5351           0.4104900474558e-07, 0.3296691780005e+01, 0.6709674010002e+01,
5352           0.4376532905131e-07, 0.3814443999443e+01, 0.6805653367890e+01,
5353           0.3314590480650e-07, 0.3560229189250e+01, 0.1259245002418e+02,
5354           0.3232421839643e-07, 0.5185389180568e+01, 0.1066495398892e+01,
5355           0.3541176318876e-07, 0.3921381909679e+01, 0.9917696840332e+01,
5356           0.3689831242681e-07, 0.4190658955386e+01, 0.1192625446156e+02,
5357           0.3890605376774e-07, 0.5546023371097e+01, 0.7478166569050e-01,
5358           0.3038559339780e-07, 0.6231032794494e+01, 0.1256621883632e+02,
5359           0.3137083969782e-07, 0.6207063419190e+01, 0.4292330755499e+01,
5360 
5361           0.4024004081854e-07, 0.1195257375713e+01, 0.1334167431096e+02,
5362           0.3300234879283e-07, 0.1804694240998e+01, 0.1057540660594e+02,
5363           0.3635399155575e-07, 0.5597811343500e+01, 0.6208294184755e+01,
5364           0.3032668691356e-07, 0.3191059366530e+01, 0.1805292951336e+02,
5365           0.2809652069058e-07, 0.4094348032570e+01, 0.3523159621801e-02,
5366           0.3696955383823e-07, 0.5219282738794e+01, 0.5966683958112e+01,
5367           0.3562894142503e-07, 0.1037247544554e+01, 0.6357857516136e+01,
5368           0.3510598524148e-07, 0.1430020816116e+01, 0.6599467742779e+01,
5369           0.3617736142953e-07, 0.3002911403677e+01, 0.6019991944201e+01,
5370           0.2624524910730e-07, 0.2437046757292e+01, 0.6702560555334e+01,
5371 
5372           0.2535824204490e-07, 0.1581594689647e+01, 0.3141537925223e+02,
5373           0.3519787226257e-07, 0.5379863121521e+01, 0.2505706758577e+03,
5374           0.2578406709982e-07, 0.4904222639329e+01, 0.1673046366289e+02,
5375           0.3423887981473e-07, 0.3646448997315e+01, 0.6546159756691e+01,
5376           0.2776083886467e-07, 0.3307829300144e+01, 0.1272157198369e+02,
5377           0.3379592818379e-07, 0.1747541251125e+01, 0.1494531617769e+02,
5378           0.3050255426284e-07, 0.1784689432607e-01, 0.4732030630302e+01,
5379           0.2652378350236e-07, 0.4420055276260e+01, 0.5863591145557e+01,
5380           0.2374498173768e-07, 0.3629773929208e+01, 0.2388894113936e+01,
5381           0.2716451255140e-07, 0.3079623706780e+01, 0.1202934727411e+02,
5382 
5383           0.3038583699229e-07, 0.3312487903507e+00, 0.1256608456547e+02,
5384           0.2220681228760e-07, 0.5265520401774e+01, 0.1336244973887e+02,
5385           0.3044156540912e-07, 0.4766664081250e+01, 0.2908881142201e+02,
5386           0.2731859923561e-07, 0.5069146530691e+01, 0.1391601904066e+02,
5387           0.2285603018171e-07, 0.5954935112271e+01, 0.6076890225335e+01,
5388           0.2025006454555e-07, 0.4061789589267e+01, 0.4701116388778e+01,
5389           0.2012597519804e-07, 0.2485047705241e+01, 0.6262720680387e+01,
5390           0.2003406962258e-07, 0.4163779209320e+01, 0.6303431020504e+01,
5391           0.2207863441371e-07, 0.6923839133828e+00, 0.6489261475556e+01,
5392           0.2481374305624e-07, 0.5944173595676e+01, 0.1204357418345e+02,
5393 
5394           0.2130923288870e-07, 0.4641013671967e+01, 0.5746271423666e+01,
5395           0.2446370543391e-07, 0.6125796518757e+01, 0.1495633313810e+00,
5396           0.1932492759052e-07, 0.2234572324504e+00, 0.1352175143971e+02,
5397           0.2600122568049e-07, 0.4281012405440e+01, 0.4590910121555e+01,
5398           0.2431754047488e-07, 0.1429943874870e+00, 0.1162474756779e+01,
5399           0.1875902869209e-07, 0.9781803816948e+00, 0.6279194432410e+01,
5400           0.1874381139426e-07, 0.5670368130173e+01, 0.6286957268481e+01,
5401           0.2156696047173e-07, 0.2008985006833e+01, 0.1813929450232e+02,
5402           0.1965076182484e-07, 0.2566186202453e+00, 0.4686889479442e+01,
5403           0.2334816372359e-07, 0.4408121891493e+01, 0.1002183730415e+02,
5404 
5405           0.1869937408802e-07, 0.5272745038656e+01, 0.2427287361862e+00,
5406           0.2436236460883e-07, 0.4407720479029e+01, 0.9514313292143e+02,
5407           0.1761365216611e-07, 0.1943892315074e+00, 0.1351787002167e+02,
5408           0.2156289480503e-07, 0.1418570924545e+01, 0.6037244212485e+01,
5409           0.2164748979255e-07, 0.4724603439430e+01, 0.2301353951334e+02,
5410           0.2222286670853e-07, 0.2400266874598e+01, 0.1266924451345e+02,
5411           0.2070901414929e-07, 0.5230348028732e+01, 0.6528907488406e+01,
5412           0.1792745177020e-07, 0.2099190328945e+01, 0.6819880277225e+01,
5413           0.1841802068445e-07, 0.3467527844848e+00, 0.6514761976723e+02,
5414           0.1578401631718e-07, 0.7098642356340e+00, 0.2077542790660e-01,
5415 
5416           0.1561690152531e-07, 0.5943349620372e+01, 0.6272439236156e+01,
5417           0.1558591045463e-07, 0.7040653478980e+00, 0.6293712464735e+01,
5418           0.1737356469576e-07, 0.4487064760345e+01, 0.1765478049437e+02,
5419           0.1434755619991e-07, 0.2993391570995e+01, 0.1102062672231e+00,
5420           0.1482187806654e-07, 0.2278049198251e+01, 0.1052268489556e+01,
5421           0.1424812827089e-07, 0.1682114725827e+01, 0.1311972100268e+02,
5422           0.1380282448623e-07, 0.3262668602579e+01, 0.1017725758696e+02,
5423           0.1811481244566e-07, 0.3187771221777e+01, 0.1887552587463e+02,
5424           0.1504446185696e-07, 0.5650162308647e+01, 0.7626583626240e-01,
5425           0.1740776154137e-07, 0.5487068607507e+01, 0.1965104848470e+02,
5426 
5427           0.1374339536251e-07, 0.5745688172201e+01, 0.6016468784579e+01,
5428           0.1761377477704e-07, 0.5748060203659e+01, 0.2593412433514e+02,
5429           0.1535138225795e-07, 0.6226848505790e+01, 0.9411464614024e+01,
5430           0.1788140543676e-07, 0.6189318878563e+01, 0.3301902111895e+02,
5431           0.1375002807996e-07, 0.5371812884394e+01, 0.6327837846670e+00,
5432           0.1242115758632e-07, 0.1471687569712e+01, 0.3894181736510e+01,
5433           0.1450977333938e-07, 0.4143836662127e+01, 0.1277945078067e+02,
5434           0.1297579575023e-07, 0.9003477661957e+00, 0.6549682916313e+01,
5435           0.1462667934821e-07, 0.5760505536428e+01, 0.1863592847156e+02,
5436           0.1381774374799e-07, 0.1085471729463e+01, 0.2379164476796e+01,
5437 
5438           0.1682333169307e-07, 0.5409870870133e+01, 0.1620077269078e+02,
5439           0.1190812918837e-07, 0.1397205174601e+01, 0.1149965630200e+02,
5440           0.1221434762106e-07, 0.9001804809095e+00, 0.1257326515556e+02,
5441           0.1549934644860e-07, 0.4262528275544e+01, 0.1820933031200e+02,
5442           0.1252138953050e-07, 0.1411642012027e+01, 0.6993008899458e+01,
5443           0.1237078905387e-07, 0.2844472403615e+01, 0.2435678079171e+02,
5444           0.1446953389615e-07, 0.5295835522223e+01, 0.3813291813120e-01,
5445           0.1388446457170e-07, 0.4969428135497e+01, 0.2458316379602e+00,
5446           0.1019339179228e-07, 0.2491369561806e+01, 0.6112403035119e+01,
5447           0.1258880815343e-07, 0.4679426248976e+01, 0.5429879531333e+01,
5448 
5449           0.1297768238261e-07, 0.1074509953328e+01, 0.1249137003520e+02,
5450           0.9913505718094e-08, 0.4735097918224e+01, 0.6247047890016e+01,
5451           0.9830453155969e-08, 0.4158649187338e+01, 0.6453748665772e+01,
5452           0.1192615865309e-07, 0.3438208613699e+01, 0.6290122169689e+01,
5453           0.9835874798277e-08, 0.1913300781229e+01, 0.6319103810876e+01,
5454           0.9639087569277e-08, 0.9487683644125e+00, 0.8273820945392e+01,
5455           0.1175716107001e-07, 0.3228141664287e+01, 0.6276029531202e+01,
5456           0.1018926508678e-07, 0.2216607854300e+01, 0.1254537627298e+02,
5457           0.9500087869225e-08, 0.2625116459733e+01, 0.1256517118505e+02,
5458           0.9664192916575e-08, 0.5860562449214e+01, 0.6259197520765e+01,
5459 
5460           0.9612858712203e-08, 0.7885682917381e+00, 0.6306954180126e+01,
5461           0.1117645675413e-07, 0.3932148831189e+01, 0.1779695906178e+02,
5462           0.1158864052160e-07, 0.9995605521691e+00, 0.1778273215245e+02,
5463           0.9021043467028e-08, 0.5263769742673e+01, 0.6172869583223e+01,
5464           0.8836134773563e-08, 0.1496843220365e+01, 0.1692165728891e+01,
5465           0.1045872200691e-07, 0.7009039517214e+00, 0.2204125344462e+00,
5466           0.1211463487798e-07, 0.4041544938511e+01, 0.8257698122054e+02,
5467           0.8541990804094e-08, 0.1447586692316e+01, 0.6393282117669e+01,
5468           0.1038720703636e-07, 0.4594249718112e+00, 0.1550861511662e+02,
5469           0.1126722351445e-07, 0.3925550579036e+01, 0.2061856251104e+00,
5470 
5471           0.8697373859631e-08, 0.4411341856037e+01, 0.9491756770005e+00,
5472           0.8869380028441e-08, 0.2402659724813e+01, 0.3903911373650e+01,
5473           0.9247014693258e-08, 0.1401579743423e+01, 0.6267823317922e+01,
5474           0.9205062930950e-08, 0.5245978000814e+01, 0.6298328382969e+01,
5475           0.8000745038049e-08, 0.3590803356945e+01, 0.2648454860559e+01,
5476           0.9168973650819e-08, 0.2470150501679e+01, 0.1498544001348e+03,
5477           0.1075444949238e-07, 0.1328606161230e+01, 0.3694923081589e+02,
5478           0.7817298525817e-08, 0.6162256225998e+01, 0.4804209201333e+01,
5479           0.9541469226356e-08, 0.3942568967039e+01, 0.1256713221673e+02,
5480           0.9821910122027e-08, 0.2360246287233e+00, 0.1140367694411e+02,
5481 
5482           0.9897822023777e-08, 0.4619805634280e+01, 0.2280573557157e+02,
5483           0.7737289283765e-08, 0.3784727847451e+01, 0.7834121070590e+01,
5484           0.9260204034710e-08, 0.2223352487601e+01, 0.2787043132925e+01,
5485           0.7320252888486e-08, 0.1288694636874e+01, 0.6282655592598e+01,
5486           0.7319785780946e-08, 0.5359869567774e+01, 0.6283496108294e+01,
5487           0.7147219933778e-08, 0.5516616675856e+01, 0.1725663147538e+02,
5488           0.7946502829878e-08, 0.2630459984567e+01, 0.1241073141809e+02,
5489           0.9001711808932e-08, 0.2849815827227e+01, 0.6281591679874e+01,
5490           0.8994041507257e-08, 0.3795244450750e+01, 0.6284560021018e+01,
5491           0.8298582787358e-08, 0.5236413127363e+00, 0.1241658836951e+02,
5492 
5493           0.8526596520710e-08, 0.4794605424426e+01, 0.1098419223922e+02,
5494           0.8209822103197e-08, 0.1578752370328e+01, 0.1096996532989e+02,
5495           0.6357049861094e-08, 0.5708926113761e+01, 0.1596186371003e+01,
5496           0.7370473179049e-08, 0.3842402530241e+01, 0.4061219149443e+01,
5497           0.7232154664726e-08, 0.3067548981535e+01, 0.1610006857377e+03,
5498           0.6328765494903e-08, 0.1313930030069e+01, 0.1193336791622e+02,
5499           0.8030064908595e-08, 0.3488500408886e+01, 0.8460828644453e+00,
5500           0.6275464259232e-08, 0.1532061626198e+01, 0.8531963191132e+00,
5501           0.7051897446325e-08, 0.3285859929993e+01, 0.5849364236221e+01,
5502           0.6161593705428e-08, 0.1477341999464e+01, 0.5573142801433e+01,
5503 
5504           0.7754683957278e-08, 0.1586118663096e+01, 0.8662240327241e+01,
5505           0.5889928990701e-08, 0.1304887868803e+01, 0.1232342296471e+02,
5506           0.5705756047075e-08, 0.4555333589350e+01, 0.1258692712880e+02,
5507           0.5964178808332e-08, 0.3001762842062e+01, 0.5333900173445e+01,
5508           0.6712446027467e-08, 0.4886780007595e+01, 0.1171295538178e+02,
5509           0.5941809275464e-08, 0.4701509603824e+01, 0.9779108567966e+01,
5510           0.5466993627395e-08, 0.4588357817278e+01, 0.1884211409667e+02,
5511           0.6340512090980e-08, 0.1164543038893e+01, 0.5217580628120e+02,
5512           0.6325505710045e-08, 0.3919171259645e+01, 0.1041998632314e+02,
5513           0.6164789509685e-08, 0.2143828253542e+01, 0.6151533897323e+01,
5514 
5515           0.5263330812430e-08, 0.6066564434241e+01, 0.1885275071096e+02,
5516           0.5597087780221e-08, 0.2926316429472e+01, 0.4337116142245e+00,
5517           0.5396556236817e-08, 0.3244303591505e+01, 0.6286362197481e+01,
5518           0.5396615148223e-08, 0.3404304703662e+01, 0.6279789503410e+01,
5519           0.7091832443341e-08, 0.8532377803192e+00, 0.4907302013889e+01,
5520           0.6572352589782e-08, 0.4901966774419e+01, 0.1176433076753e+02,
5521           0.5960236060795e-08, 0.1874672315797e+01, 0.1422690933580e-01,
5522           0.5125480043511e-08, 0.3735726064334e+01, 0.1245594543367e+02,
5523           0.5928241866410e-08, 0.4502033899935e+01, 0.6414617803568e+01,
5524           0.5249600357424e-08, 0.4372334799878e+01, 0.1151388321134e+02,
5525 
5526           0.6059171276087e-08, 0.2581617302908e+01, 0.6062663316000e+01,
5527           0.5295235081662e-08, 0.2974811513158e+01, 0.3496032717521e+01,
5528           0.5820561875933e-08, 0.1796073748244e+00, 0.2838593341516e+00,
5529           0.4754696606440e-08, 0.1981998136973e+01, 0.3104930017775e+01,
5530           0.6385053548955e-08, 0.2559174171605e+00, 0.6133512519065e+01,
5531           0.6589828273941e-08, 0.2750967106776e+01, 0.4087944051283e+02,
5532           0.5383376567189e-08, 0.6325947523578e+00, 0.2248384854122e+02,
5533           0.5928941683538e-08, 0.1672304519067e+01, 0.1581959461667e+01,
5534           0.4816060709794e-08, 0.3512566172575e+01, 0.9388005868221e+01,
5535           0.6003381586512e-08, 0.5610932219189e+01, 0.5326786718777e+01,
5536 
5537           0.5504225393105e-08, 0.4037501131256e+01, 0.6503488384892e+01,
5538           0.5353772620129e-08, 0.6122774968240e+01, 0.1735668374386e+03,
5539           0.5786253768544e-08, 0.5527984999515e+01, 0.1350651127443e+00,
5540           0.5065706702002e-08, 0.9980765573624e+00, 0.1248988586463e+02,
5541           0.5972838885276e-08, 0.6044489493203e+01, 0.2673594526851e+02,
5542           0.5323585877961e-08, 0.3924265998147e+01, 0.4171425416666e+01,
5543           0.5210772682858e-08, 0.6220111376901e+01, 0.2460261242967e+02,
5544           0.4726549040535e-08, 0.3716043206862e+01, 0.7232251527446e+01,
5545           0.6029425105059e-08, 0.8548704071116e+00, 0.3227113045244e+03,
5546           0.4481542826513e-08, 0.1426925072829e+01, 0.5547199253223e+01,
5547 
5548           0.5836024505068e-08, 0.7135651752625e-01, 0.7285056171570e+02,
5549           0.4137046613272e-08, 0.5330767643283e+01, 0.1087398597200e+02,
5550           0.5171977473924e-08, 0.4494262335353e+00, 0.1884570439172e+02,
5551           0.5694429833732e-08, 0.2952369582215e+01, 0.9723862754494e+02,
5552           0.4009158925298e-08, 0.3500003416535e+01, 0.6244942932314e+01,
5553           0.4784939596873e-08, 0.6196709413181e+01, 0.2929661536378e+02,
5554           0.3983725022610e-08, 0.5103690031897e+01, 0.4274518229222e+01,
5555           0.3870535232462e-08, 0.3187569587401e+01, 0.6321208768577e+01,
5556           0.5140501213951e-08, 0.1668924357457e+01, 0.1232032006293e+02,
5557           0.3849034819355e-08, 0.4445722510309e+01, 0.1726726808967e+02,
5558 
5559           0.4002383075060e-08, 0.5226224152423e+01, 0.7018952447668e+01,
5560           0.3890719543549e-08, 0.4371166550274e+01, 0.1491901785440e+02,
5561           0.4887084607881e-08, 0.5973556689693e+01, 0.1478866649112e+01,
5562           0.3739939287592e-08, 0.2089084714600e+01, 0.6922973089781e+01,
5563           0.5031925918209e-08, 0.4658371936827e+01, 0.1715706182245e+02,
5564           0.4387748764954e-08, 0.4825580552819e+01, 0.2331413144044e+03,
5565           0.4147398098865e-08, 0.3739003524998e+01, 0.1376059875786e+02,
5566           0.3719089993586e-08, 0.1148941386536e+01, 0.6297302759782e+01,
5567           0.3934238461056e-08, 0.1559893008343e+01, 0.7872148766781e+01,
5568           0.3672471375622e-08, 0.5516145383612e+01, 0.6268848941110e+01,
5569 
5570           0.3768911277583e-08, 0.6116053700563e+01, 0.4157198507331e+01,
5571           0.4033388417295e-08, 0.5076821746017e+01, 0.1567108171867e+02,
5572           0.3764194617832e-08, 0.8164676232075e+00, 0.3185192151914e+01,
5573           0.4840628226284e-08, 0.1360479453671e+01, 0.1252801878276e+02,
5574           0.4949443923785e-08, 0.2725622229926e+01, 0.1617106187867e+03,
5575           0.4117393089971e-08, 0.6054459628492e+00, 0.5642198095270e+01,
5576           0.3925754020428e-08, 0.8570462135210e+00, 0.2139354194808e+02,
5577           0.3630551757923e-08, 0.3552067338279e+01, 0.6294805223347e+01,
5578           0.3627274802357e-08, 0.3096565085313e+01, 0.6271346477544e+01,
5579           0.3806143885093e-08, 0.6367751709777e+00, 0.1725304118033e+02,
5580 
5581           0.4433254641565e-08, 0.4848461503937e+01, 0.7445550607224e+01,
5582           0.3712319846576e-08, 0.1331950643655e+01, 0.4194847048887e+00,
5583           0.3849847534783e-08, 0.4958368297746e+00, 0.9562891316684e+00,
5584           0.3483955430165e-08, 0.2237215515707e+01, 0.1161697602389e+02,
5585           0.3961912730982e-08, 0.3332402188575e+01, 0.2277943724828e+02,
5586           0.3419978244481e-08, 0.5785600576016e+01, 0.1362553364512e+02,
5587           0.3329417758177e-08, 0.9812676559709e-01, 0.1685848245639e+02,
5588           0.4207206893193e-08, 0.9494780468236e+00, 0.2986433403208e+02,
5589           0.3268548976410e-08, 0.1739332095686e+00, 0.5749861718712e+01,
5590           0.3321880082685e-08, 0.1423354800666e+01, 0.6279143387820e+01,
5591 
5592           0.4503173010852e-08, 0.2314972675293e+00, 0.1385561574497e+01,
5593           0.4316599090954e-08, 0.1012646782616e+00, 0.4176041334900e+01,
5594           0.3283493323850e-08, 0.5233306881265e+01, 0.6287008313071e+01,
5595           0.3164033542343e-08, 0.4005597257511e+01, 0.2099539292909e+02,
5596           0.4159720956725e-08, 0.5365676242020e+01, 0.5905702259363e+01,
5597           0.3565176892217e-08, 0.4284440620612e+01, 0.3932462625300e-02,
5598           0.3514440950221e-08, 0.4270562636575e+01, 0.7335344340001e+01,
5599           0.3540596871909e-08, 0.5953553201060e+01, 0.1234573916645e+02,
5600           0.2960769905118e-08, 0.1115180417718e+01, 0.2670964694522e+02,
5601           0.2962213739684e-08, 0.3863811918186e+01, 0.6408777551755e+00,
5602 
5603           0.3883556700251e-08, 0.1268617928302e+01, 0.6660449441528e+01,
5604           0.2919225516346e-08, 0.4908605223265e+01, 0.1375773836557e+01,
5605           0.3115158863370e-08, 0.3744519976885e+01, 0.3802769619140e-01,
5606           0.4099438144212e-08, 0.4173244670532e+01, 0.4480965020977e+02,
5607           0.2899531858964e-08, 0.5910601428850e+01, 0.2059724391010e+02,
5608           0.3289733429855e-08, 0.2488050078239e+01, 0.1081813534213e+02,
5609           0.3933075612875e-08, 0.1122363652883e+01, 0.3773735910827e+00,
5610           0.3021403764467e-08, 0.4951973724904e+01, 0.2982630633589e+02,
5611           0.2798598949757e-08, 0.5117057845513e+01, 0.1937891852345e+02,
5612           0.3397421302707e-08, 0.6104159180476e+01, 0.6923953605621e+01,
5613 
5614           0.3720398002179e-08, 0.1184933429829e+01, 0.3066615496545e+02,
5615           0.3598484186267e-08, 0.3505282086105e+01, 0.6147450479709e+01,
5616           0.3694594027310e-08, 0.2286651088141e+01, 0.2636725487657e+01,
5617           0.2680444152969e-08, 0.1871816775482e+00, 0.6816289982179e+01,
5618           0.3497574865641e-08, 0.3143251755431e+01, 0.6418701221183e+01,
5619           0.3130274129494e-08, 0.2462167316018e+01, 0.1235996607578e+02,
5620           0.3241119069551e-08, 0.4256374004686e+01, 0.1652265972112e+02,
5621           0.2601960842061e-08, 0.4970362941425e+01, 0.1045450126711e+02,
5622           0.2690601527504e-08, 0.2372657824898e+01, 0.3163918923335e+00,
5623           0.2908688152664e-08, 0.4232652627721e+01, 0.2828699048865e+02,
5624 
5625           0.3120456131875e-08, 0.3925747001137e+00, 0.2195415756911e+02,
5626           0.3148855423384e-08, 0.3093478330445e+01, 0.1172006883645e+02,
5627           0.3051044261017e-08, 0.5560948248212e+01, 0.6055599646783e+01,
5628           0.2826006876660e-08, 0.5072790310072e+01, 0.5120601093667e+01,
5629           0.3100034191711e-08, 0.4998530231096e+01, 0.1799603123222e+02,
5630           0.2398771640101e-08, 0.2561739802176e+01, 0.6255674361143e+01,
5631           0.2384002842728e-08, 0.4087420284111e+01, 0.6310477339748e+01,
5632           0.2842146517568e-08, 0.2515048217955e+01, 0.5469525544182e+01,
5633           0.2847674371340e-08, 0.5235326497443e+01, 0.1034429499989e+02,
5634           0.2903722140764e-08, 0.1088200795797e+01, 0.6510552054109e+01,
5635 
5636           0.3187610710605e-08, 0.4710624424816e+01, 0.1693792562116e+03,
5637           0.3048869992813e-08, 0.2857975896445e+00, 0.8390110365991e+01,
5638           0.2860216950984e-08, 0.2241619020815e+01, 0.2243449970715e+00,
5639           0.2701117683113e-08, 0.6651573305272e-01, 0.6129297044991e+01,
5640           0.2509891590152e-08, 0.1285135324585e+01, 0.1044027435778e+02,
5641           0.2623200252223e-08, 0.2981229834530e+00, 0.6436854655901e+01,
5642           0.2622541669202e-08, 0.6122470726189e+01, 0.9380959548977e+01,
5643           0.2818435667099e-08, 0.4251087148947e+01, 0.5934151399930e+01,
5644           0.2365196797465e-08, 0.3465070460790e+01, 0.2470570524223e+02,
5645           0.2358704646143e-08, 0.5791603815350e+01, 0.8671969964381e+01,
5646 
5647           0.2388299481390e-08, 0.4142483772941e+01, 0.7096626156709e+01,
5648           0.1996041217224e-08, 0.2101901889496e+01, 0.1727188400790e+02,
5649           0.2687593060336e-08, 0.1526689456959e+01, 0.7075506709219e+02,
5650           0.2618913670810e-08, 0.2397684236095e+01, 0.6632000300961e+01,
5651           0.2571523050364e-08, 0.5751929456787e+00, 0.6206810014183e+01,
5652           0.2582135006946e-08, 0.5595464352926e+01, 0.4873985990671e+02,
5653           0.2372530190361e-08, 0.5092689490655e+01, 0.1590676413561e+02,
5654           0.2357178484712e-08, 0.4444363527851e+01, 0.3097883698531e+01,
5655           0.2451590394723e-08, 0.3108251687661e+01, 0.6612329252343e+00,
5656           0.2370045949608e-08, 0.2608133861079e+01, 0.3459636466239e+02,
5657 
5658           0.2268997267358e-08, 0.3639717753384e+01, 0.2844914056730e-01,
5659           0.1731432137906e-08, 0.1741898445707e+00, 0.2019909489111e+02,
5660           0.1629869741622e-08, 0.3902225646724e+01, 0.3035599730800e+02,
5661           0.2206215801974e-08, 0.4971131250731e+01, 0.6281667977667e+01,
5662           0.2205469554680e-08, 0.1677462357110e+01, 0.6284483723224e+01,
5663           0.2148792362509e-08, 0.4236259604006e+01, 0.1980482729015e+02,
5664           0.1873733657847e-08, 0.5926814998687e+01, 0.2876692439167e+02,
5665           0.2026573758959e-08, 0.4349643351962e+01, 0.2449240616245e+02,
5666           0.1807770325110e-08, 0.5700940482701e+01, 0.2045286941806e+02,
5667           0.1881174408581e-08, 0.6601286363430e+00, 0.2358125818164e+02,
5668 
5669           0.1368023671690e-08, 0.2211098592752e+01, 0.2473415438279e+02,
5670           0.1720017916280e-08, 0.4942488551129e+01, 0.1679593901136e+03,
5671           0.1702427665131e-08, 0.1452233856386e+01, 0.3338575901272e+03,
5672           0.1414032510054e-08, 0.5525357721439e+01, 0.1624205518357e+03,
5673           0.1652626045364e-08, 0.4108794283624e+01, 0.8956999012000e+02,
5674           0.1642957769686e-08, 0.7344335209984e+00, 0.5267006960365e+02,
5675           0.1614952403624e-08, 0.3541213951363e+01, 0.3332657872986e+02,
5676           0.1535988291188e-08, 0.4031094072151e+01, 0.3852657435933e+02,
5677           0.1593193738177e-08, 0.4185136203609e+01, 0.2282781046519e+03,
5678           0.1074569126382e-08, 0.1720485636868e+01, 0.8397383534231e+02,
5679 
5680           0.1074408214509e-08, 0.2758613420318e+01, 0.8401985929482e+02,
5681           0.9700199670465e-09, 0.4216686842097e+01, 0.7826370942180e+02,
5682           0.1258433517061e-08, 0.2575068876639e+00, 0.3115650189215e+03,
5683           0.1240303229539e-08, 0.4800844956756e+00, 0.1784300471910e+03,
5684           0.9018345948127e-09, 0.3896756361552e+00, 0.5886454391678e+02,
5685           0.1135301432805e-08, 0.3700805023550e+00, 0.7842370451713e+02,
5686           0.9215887951370e-09, 0.4364579276638e+01, 0.1014262087719e+03,
5687           0.1055401054147e-08, 0.2156564222111e+01, 0.5660027930059e+02,
5688           0.1008725979831e-08, 0.5454015785234e+01, 0.4245678405627e+02,
5689           0.7217398104321e-09, 0.1597772562175e+01, 0.2457074661053e+03,
5690 
5691           0.6912033134447e-09, 0.5824090621461e+01, 0.1679936946371e+03,
5692           0.6833881523549e-09, 0.3578778482835e+01, 0.6053048899753e+02,
5693           0.4887304205142e-09, 0.3724362812423e+01, 0.9656299901946e+02,
5694           0.5173709754788e-09, 0.5422427507933e+01, 0.2442876000072e+03,
5695           0.4671353097145e-09, 0.2396106924439e+01, 0.1435713242844e+03,
5696           0.5652608439480e-09, 0.2804028838685e+01, 0.8365903305582e+02,
5697           0.5604061331253e-09, 0.1638816006247e+01, 0.8433466158131e+02,
5698           0.4712723365400e-09, 0.8979003224474e+00, 0.3164282286739e+03,
5699           0.4909967465112e-09, 0.3210426725516e+01, 0.4059982187939e+03,
5700           0.4771358267658e-09, 0.5308027211629e+01, 0.1805255418145e+03,
5701 
5702           0.3943451445989e-09, 0.2195145341074e+01, 0.2568537517081e+03,
5703           0.3952109120244e-09, 0.5081189491586e+01, 0.2449975330562e+03,
5704           0.3788134594789e-09, 0.4345171264441e+01, 0.1568131045107e+03,
5705           0.3738330190479e-09, 0.2613062847997e+01, 0.3948519331910e+03,
5706           0.3099866678136e-09, 0.2846760817689e+01, 0.1547176098872e+03,
5707           0.2002962716768e-09, 0.4921360989412e+01, 0.2268582385539e+03,
5708           0.2198291338754e-09, 0.1130360117454e+00, 0.1658638954901e+03,
5709           0.1491958330784e-09, 0.4228195232278e+01, 0.2219950288015e+03,
5710           0.1475384076173e-09, 0.3005721811604e+00, 0.3052819430710e+03,
5711           0.1661626624624e-09, 0.7830125621203e+00, 0.2526661704812e+03,
5712 
5713           0.9015823460025e-10, 0.3807792942715e+01, 0.4171445043968e+03 };
5714 
5715     /* Sun-to-Earth, T^0, Y */
5716       static final double e0y[] = {
5717           0.9998921098898e+00, 0.1826583913846e+00, 0.6283075850446e+01,
5718          -0.2442700893735e-01, 0.0000000000000e+00, 0.0000000000000e+00,
5719           0.8352929742915e-02, 0.1395277998680e+00, 0.1256615170089e+02,
5720           0.1046697300177e-03, 0.9641423109763e-01, 0.1884922755134e+02,
5721           0.3110841876663e-04, 0.5381140401712e+01, 0.8399684731857e+02,
5722           0.2570269094593e-04, 0.5301016407128e+01, 0.5296909721118e+00,
5723           0.2147389623610e-04, 0.2662510869850e+01, 0.1577343543434e+01,
5724           0.1680344384050e-04, 0.5207904119704e+01, 0.6279552690824e+01,
5725           0.1679117312193e-04, 0.4582187486968e+01, 0.6286599010068e+01,
5726           0.1440512068440e-04, 0.1900688517726e+01, 0.2352866153506e+01,
5727 
5728           0.1135139664999e-04, 0.5273108538556e+01, 0.5223693906222e+01,
5729           0.9345482571018e-05, 0.4503047687738e+01, 0.1203646072878e+02,
5730           0.9007418719568e-05, 0.1605621059637e+01, 0.1021328554739e+02,
5731           0.5671536712314e-05, 0.5812849070861e+00, 0.1059381944224e+01,
5732           0.7451401861666e-05, 0.2807346794836e+01, 0.3981490189893e+00,
5733           0.6393470057114e-05, 0.6029224133855e+01, 0.5753384878334e+01,
5734           0.6814275881697e-05, 0.6472990145974e+00, 0.4705732307012e+01,
5735           0.6113705628887e-05, 0.3813843419700e+01, 0.6812766822558e+01,
5736           0.4503851367273e-05, 0.4527804370996e+01, 0.5884926831456e+01,
5737           0.4522249141926e-05, 0.5991783029224e+01, 0.6256777527156e+01,
5738 
5739           0.4501794307018e-05, 0.3798703844397e+01, 0.6309374173736e+01,
5740           0.5514927480180e-05, 0.3961257833388e+01, 0.5507553240374e+01,
5741           0.4062862799995e-05, 0.5256247296369e+01, 0.6681224869435e+01,
5742           0.5414900429712e-05, 0.5499032014097e+01, 0.7755226100720e+00,
5743           0.5463153987424e-05, 0.6173092454097e+01, 0.1414349524433e+02,
5744           0.5071611859329e-05, 0.2870244247651e+01, 0.7860419393880e+01,
5745           0.2195112094455e-05, 0.2952338617201e+01, 0.1150676975667e+02,
5746           0.2279139233919e-05, 0.5951775132933e+01, 0.7058598460518e+01,
5747           0.2278386100876e-05, 0.4845456398785e+01, 0.4694002934110e+01,
5748           0.2559088003308e-05, 0.6945321117311e+00, 0.1216800268190e+02,
5749 
5750           0.2561079286856e-05, 0.6167224608301e+01, 0.7099330490126e+00,
5751           0.1792755796387e-05, 0.1400122509632e+01, 0.7962980379786e+00,
5752           0.1818715656502e-05, 0.4703347611830e+01, 0.6283142985870e+01,
5753           0.1818744924791e-05, 0.5086748900237e+01, 0.6283008715021e+01,
5754           0.1554518791390e-05, 0.5331008042713e-01, 0.2513230340178e+02,
5755           0.2063265737239e-05, 0.4283680484178e+01, 0.1179062909082e+02,
5756           0.1497613520041e-05, 0.6074207826073e+01, 0.5486777812467e+01,
5757           0.2000617940427e-05, 0.2501426281450e+01, 0.1778984560711e+02,
5758           0.1289731195580e-05, 0.3646340599536e+01, 0.7079373888424e+01,
5759           0.1282657998934e-05, 0.3232864804902e+01, 0.3738761453707e+01,
5760 
5761           0.1528915968658e-05, 0.5581433416669e+01, 0.2132990797783e+00,
5762           0.1187304098432e-05, 0.5453576453694e+01, 0.9437762937313e+01,
5763           0.7842782928118e-06, 0.2823953922273e+00, 0.8827390247185e+01,
5764           0.7352892280868e-06, 0.1124369580175e+01, 0.1589072916335e+01,
5765           0.6570189360797e-06, 0.2089154042840e+01, 0.1176985366291e+02,
5766           0.6324967590410e-06, 0.6704855581230e+00, 0.6262300422539e+01,
5767           0.6298289872283e-06, 0.2836414855840e+01, 0.6303851278352e+01,
5768           0.6476686465855e-06, 0.4852433866467e+00, 0.7113454667900e-02,
5769           0.8587034651234e-06, 0.1453511005668e+01, 0.1672837615881e+03,
5770           0.8068948788113e-06, 0.9224087798609e+00, 0.6069776770667e+01,
5771 
5772           0.8353786011661e-06, 0.4631707184895e+01, 0.3340612434717e+01,
5773           0.6009324532132e-06, 0.1829498827726e+01, 0.4136910472696e+01,
5774           0.7558158559566e-06, 0.2588596800317e+01, 0.6496374930224e+01,
5775           0.5809279504503e-06, 0.5516818853476e+00, 0.1097707878456e+02,
5776           0.5374131950254e-06, 0.6275674734960e+01, 0.1194447056968e+01,
5777           0.5711160507326e-06, 0.1091905956872e+01, 0.6282095334605e+01,
5778           0.5710183170746e-06, 0.2415001635090e+01, 0.6284056366286e+01,
5779           0.5144373590610e-06, 0.6020336443438e+01, 0.6290189305114e+01,
5780           0.5103108927267e-06, 0.3775634564605e+01, 0.6275962395778e+01,
5781           0.4960654697891e-06, 0.1073450946756e+01, 0.6127655567643e+01,
5782 
5783           0.4786385689280e-06, 0.2431178012310e+01, 0.6438496133249e+01,
5784           0.6109911263665e-06, 0.5343356157914e+01, 0.3154687086868e+01,
5785           0.4839898944024e-06, 0.5830833594047e-01, 0.8018209333619e+00,
5786           0.4734822623919e-06, 0.4536080134821e+01, 0.3128388763578e+01,
5787           0.4834741473290e-06, 0.2585090489754e+00, 0.7084896783808e+01,
5788           0.5134858581156e-06, 0.4213317172603e+01, 0.1235285262111e+02,
5789           0.5064004264978e-06, 0.4814418806478e+00, 0.1185621865188e+02,
5790           0.3753476772761e-06, 0.1599953399788e+01, 0.8429241228195e+01,
5791           0.4935264014283e-06, 0.2157417556873e+01, 0.2544314396739e+01,
5792           0.3950929600897e-06, 0.3359394184254e+01, 0.5481254917084e+01,
5793 
5794           0.4895849789777e-06, 0.5165704376558e+01, 0.9225539266174e+01,
5795           0.4215241688886e-06, 0.2065368800993e+01, 0.1726015463500e+02,
5796           0.3796773731132e-06, 0.1468606346612e+01, 0.4265981595566e+00,
5797           0.3114178142515e-06, 0.3615638079474e+01, 0.2146165377750e+01,
5798           0.3260664220838e-06, 0.4417134922435e+01, 0.4164311961999e+01,
5799           0.3976996123008e-06, 0.4700866883004e+01, 0.5856477690889e+01,
5800           0.2801459672924e-06, 0.4538902060922e+01, 0.1256967486051e+02,
5801           0.3638931868861e-06, 0.1334197991475e+01, 0.1807370494127e+02,
5802           0.2487013269476e-06, 0.3749275558275e+01, 0.2629832328990e-01,
5803           0.3034165481994e-06, 0.4236622030873e+00, 0.4535059491685e+01,
5804 
5805           0.2676278825586e-06, 0.5970848007811e+01, 0.3930209696940e+01,
5806           0.2764903818918e-06, 0.5194636754501e+01, 0.1256262854127e+02,
5807           0.2485149930507e-06, 0.1002434207846e+01, 0.5088628793478e+01,
5808           0.2199305540941e-06, 0.3066773098403e+01, 0.1255903824622e+02,
5809           0.2571106500435e-06, 0.7588312459063e+00, 0.1336797263425e+02,
5810           0.2049751817158e-06, 0.3444977434856e+01, 0.1137170464392e+02,
5811           0.2599707296297e-06, 0.1873128542205e+01, 0.7143069561767e+02,
5812           0.1785018072217e-06, 0.5015891306615e+01, 0.1748016358760e+01,
5813           0.2324833891115e-06, 0.4618271239730e+01, 0.1831953657923e+02,
5814           0.1709711119545e-06, 0.5300003455669e+01, 0.4933208510675e+01,
5815 
5816           0.2107159351716e-06, 0.2229819815115e+01, 0.7477522907414e+01,
5817           0.1750333080295e-06, 0.6161485880008e+01, 0.1044738781244e+02,
5818           0.2000598210339e-06, 0.2967357299999e+01, 0.8031092209206e+01,
5819           0.1380920248681e-06, 0.3027007923917e+01, 0.8635942003952e+01,
5820           0.1412460470299e-06, 0.6037597163798e+01, 0.2942463415728e+01,
5821           0.1888459803001e-06, 0.8561476243374e+00, 0.1561374759853e+03,
5822           0.1788370542585e-06, 0.4869736290209e+01, 0.1592596075957e+01,
5823           0.1360893296167e-06, 0.3626411886436e+01, 0.1309584267300e+02,
5824           0.1506846530160e-06, 0.1550975377427e+01, 0.1649636139783e+02,
5825           0.1800913376176e-06, 0.2075826033190e+01, 0.1729818233119e+02,
5826 
5827           0.1436261390649e-06, 0.6148876420255e+01, 0.2042657109477e+02,
5828           0.1220227114151e-06, 0.4382583879906e+01, 0.7632943190217e+01,
5829           0.1337883603592e-06, 0.2036644327361e+01, 0.1213955354133e+02,
5830           0.1159326650738e-06, 0.3892276994687e+01, 0.5331357529664e+01,
5831           0.1352853128569e-06, 0.1447950649744e+01, 0.1673046366289e+02,
5832           0.1433408296083e-06, 0.4457854692961e+01, 0.7342457794669e+01,
5833           0.1234701666518e-06, 0.1538818147151e+01, 0.6279485555400e+01,
5834           0.1234027192007e-06, 0.1968523220760e+01, 0.6286666145492e+01,
5835           0.1244024091797e-06, 0.5779803499985e+01, 0.1511046609763e+02,
5836           0.1097934945516e-06, 0.6210975221388e+00, 0.1098880815746e+02,
5837 
5838           0.1254611329856e-06, 0.2591963807998e+01, 0.1572083878776e+02,
5839           0.1158247286784e-06, 0.2483612812670e+01, 0.5729506548653e+01,
5840           0.9039078252960e-07, 0.3857554579796e+01, 0.9623688285163e+01,
5841           0.9108024978836e-07, 0.5826368512984e+01, 0.7234794171227e+01,
5842           0.8887068108436e-07, 0.3475694573987e+01, 0.6148010737701e+01,
5843           0.8632374035438e-07, 0.3059070488983e-01, 0.6418140963190e+01,
5844           0.7893186992967e-07, 0.1583194837728e+01, 0.2118763888447e+01,
5845           0.8297650201172e-07, 0.8519770534637e+00, 0.1471231707864e+02,
5846           0.1019759578988e-06, 0.1319598738732e+00, 0.1349867339771e+01,
5847           0.1010037696236e-06, 0.9937860115618e+00, 0.6836645152238e+01,
5848 
5849           0.1047727548266e-06, 0.1382138405399e+01, 0.5999216516294e+01,
5850           0.7351993881086e-07, 0.3833397851735e+01, 0.6040347114260e+01,
5851           0.9868771092341e-07, 0.2124913814390e+01, 0.6566935184597e+01,
5852           0.7007321959390e-07, 0.5946305343763e+01, 0.6525804586632e+01,
5853           0.6861411679709e-07, 0.4574654977089e+01, 0.7238675589263e+01,
5854           0.7554519809614e-07, 0.5949232686844e+01, 0.1253985337760e+02,
5855           0.9541880448335e-07, 0.3495242990564e+01, 0.2122839202813e+02,
5856           0.7185606722155e-07, 0.4310113471661e+01, 0.6245048154254e+01,
5857           0.7131360871710e-07, 0.5480309323650e+01, 0.6321103546637e+01,
5858           0.6651142021039e-07, 0.5411097713654e+01, 0.5327476111629e+01,
5859 
5860           0.8538618213667e-07, 0.1827849973951e+01, 0.1101510648075e+02,
5861           0.8634954288044e-07, 0.5443584943349e+01, 0.5643178611111e+01,
5862           0.7449415051484e-07, 0.2011535459060e+01, 0.5368044267797e+00,
5863           0.7421047599169e-07, 0.3464562529249e+01, 0.2354323048545e+02,
5864           0.6140694354424e-07, 0.5657556228815e+01, 0.1296430071988e+02,
5865           0.6353525143033e-07, 0.3463816593821e+01, 0.1990745094947e+01,
5866           0.6221964013447e-07, 0.1532259498697e+01, 0.9517183207817e+00,
5867           0.5852480257244e-07, 0.1375396598875e+01, 0.9555997388169e+00,
5868           0.6398637498911e-07, 0.2405645801972e+01, 0.2407292145756e+02,
5869           0.7039744069878e-07, 0.5397541799027e+01, 0.5225775174439e+00,
5870 
5871           0.6977997694382e-07, 0.4762347105419e+01, 0.1097355562493e+02,
5872           0.7460629558396e-07, 0.2711944692164e+01, 0.2200391463820e+02,
5873           0.5376577536101e-07, 0.2352980430239e+01, 0.1431416805965e+02,
5874           0.7530607893556e-07, 0.1943940180699e+01, 0.1842262939178e+02,
5875           0.6822928971605e-07, 0.4337651846959e+01, 0.1554202828031e+00,
5876           0.6220772380094e-07, 0.6716871369278e+00, 0.1845107853235e+02,
5877           0.6586950799043e-07, 0.2229714460505e+01, 0.5216580451554e+01,
5878           0.5873800565771e-07, 0.7627013920580e+00, 0.6398972393349e+00,
5879           0.6264346929745e-07, 0.6202785478961e+00, 0.6277552955062e+01,
5880           0.6257929115669e-07, 0.2886775596668e+01, 0.6288598745829e+01,
5881 
5882           0.5343536033409e-07, 0.1977241012051e+01, 0.4690479774488e+01,
5883           0.5587849781714e-07, 0.1922923484825e+01, 0.1551045220144e+01,
5884           0.6905100845603e-07, 0.3570757164631e+01, 0.1030928125552e+00,
5885           0.6178957066649e-07, 0.5197558947765e+01, 0.5230807360890e+01,
5886           0.6187270224331e-07, 0.8193497368922e+00, 0.5650292065779e+01,
5887           0.5385664291426e-07, 0.5406336665586e+01, 0.7771377146812e+02,
5888           0.6329363917926e-07, 0.2837760654536e+01, 0.2608790314060e+02,
5889           0.4546018761604e-07, 0.2933580297050e+01, 0.5535693017924e+00,
5890           0.6196091049375e-07, 0.4157871494377e+01, 0.8467247584405e+02,
5891           0.6159555108218e-07, 0.3211703561703e+01, 0.2394243902548e+03,
5892 
5893           0.4995340539317e-07, 0.1459098102922e+01, 0.4732030630302e+01,
5894           0.5457031243572e-07, 0.1430457676136e+01, 0.6179983037890e+01,
5895           0.4863461418397e-07, 0.2196425916730e+01, 0.9027992316901e+02,
5896           0.5342947626870e-07, 0.2086612890268e+01, 0.6386168663001e+01,
5897           0.5674296648439e-07, 0.2760204966535e+01, 0.6915859635113e+01,
5898           0.4745783120161e-07, 0.4245368971862e+01, 0.6282970628506e+01,
5899           0.4745676961198e-07, 0.5544725787016e+01, 0.6283181072386e+01,
5900           0.4049796869973e-07, 0.2213984363586e+01, 0.6254626709878e+01,
5901           0.4248333596940e-07, 0.8075781952896e+00, 0.7875671926403e+01,
5902           0.4027178070205e-07, 0.1293268540378e+01, 0.6311524991013e+01,
5903 
5904           0.4066543943476e-07, 0.3986141175804e+01, 0.3634620989887e+01,
5905           0.4858863787880e-07, 0.1276112738231e+01, 0.5760498333002e+01,
5906           0.5277398263530e-07, 0.4916111741527e+01, 0.2515860172507e+02,
5907           0.4105635656559e-07, 0.1725805864426e+01, 0.6709674010002e+01,
5908           0.4376781925772e-07, 0.2243642442106e+01, 0.6805653367890e+01,
5909           0.3235827894693e-07, 0.3614135118271e+01, 0.1066495398892e+01,
5910           0.3073244740308e-07, 0.2460873393460e+01, 0.5863591145557e+01,
5911           0.3088609271373e-07, 0.5678431771790e+01, 0.9917696840332e+01,
5912           0.3393022279836e-07, 0.3814017477291e+01, 0.1391601904066e+02,
5913           0.3038686508802e-07, 0.4660216229171e+01, 0.1256621883632e+02,
5914 
5915           0.4019677752497e-07, 0.5906906243735e+01, 0.1334167431096e+02,
5916           0.3288834998232e-07, 0.9536146445882e+00, 0.1620077269078e+02,
5917           0.3889973794631e-07, 0.3942205097644e+01, 0.7478166569050e-01,
5918           0.3050438987141e-07, 0.1624810271286e+01, 0.1805292951336e+02,
5919           0.3601142564638e-07, 0.4030467142575e+01, 0.6208294184755e+01,
5920           0.3689015557141e-07, 0.3648878818694e+01, 0.5966683958112e+01,
5921           0.3563471893565e-07, 0.5749584017096e+01, 0.6357857516136e+01,
5922           0.2776183170667e-07, 0.2630124187070e+01, 0.3523159621801e-02,
5923           0.2922350530341e-07, 0.1790346403629e+01, 0.1272157198369e+02,
5924           0.3511076917302e-07, 0.6142198301611e+01, 0.6599467742779e+01,
5925 
5926           0.3619351007632e-07, 0.1432421386492e+01, 0.6019991944201e+01,
5927           0.2561254711098e-07, 0.2302822475792e+01, 0.1259245002418e+02,
5928           0.2626903942920e-07, 0.8660470994571e+00, 0.6702560555334e+01,
5929           0.2550187397083e-07, 0.6069721995383e+01, 0.1057540660594e+02,
5930           0.2535873526138e-07, 0.1079020331795e-01, 0.3141537925223e+02,
5931           0.3519786153847e-07, 0.3809066902283e+01, 0.2505706758577e+03,
5932           0.3424651492873e-07, 0.2075435114417e+01, 0.6546159756691e+01,
5933           0.2372676630861e-07, 0.2057803120154e+01, 0.2388894113936e+01,
5934           0.2710980779541e-07, 0.1510068488010e+01, 0.1202934727411e+02,
5935           0.3038710889704e-07, 0.5043617528901e+01, 0.1256608456547e+02,
5936 
5937           0.2220364130585e-07, 0.3694793218205e+01, 0.1336244973887e+02,
5938           0.3025880825460e-07, 0.5450618999049e-01, 0.2908881142201e+02,
5939           0.2784493486864e-07, 0.3381164084502e+01, 0.1494531617769e+02,
5940           0.2294414142438e-07, 0.4382309025210e+01, 0.6076890225335e+01,
5941           0.2012723294724e-07, 0.9142212256518e+00, 0.6262720680387e+01,
5942           0.2036357831958e-07, 0.5676172293154e+01, 0.4701116388778e+01,
5943           0.2003474823288e-07, 0.2592767977625e+01, 0.6303431020504e+01,
5944           0.2207144900109e-07, 0.5404976271180e+01, 0.6489261475556e+01,
5945           0.2481664905135e-07, 0.4373284587027e+01, 0.1204357418345e+02,
5946           0.2674949182295e-07, 0.5859182188482e+01, 0.4590910121555e+01,
5947 
5948           0.2450554720322e-07, 0.4555381557451e+01, 0.1495633313810e+00,
5949           0.2601975986457e-07, 0.3933165584959e+01, 0.1965104848470e+02,
5950           0.2199860022848e-07, 0.5227977189087e+01, 0.1351787002167e+02,
5951           0.2448121172316e-07, 0.4858060353949e+01, 0.1162474756779e+01,
5952           0.1876014864049e-07, 0.5690546553605e+01, 0.6279194432410e+01,
5953           0.1874513219396e-07, 0.4099539297446e+01, 0.6286957268481e+01,
5954           0.2156380842559e-07, 0.4382594769913e+00, 0.1813929450232e+02,
5955           0.1981691240061e-07, 0.1829784152444e+01, 0.4686889479442e+01,
5956           0.2329992648539e-07, 0.2836254278973e+01, 0.1002183730415e+02,
5957           0.1765184135302e-07, 0.2803494925833e+01, 0.4292330755499e+01,
5958 
5959           0.2436368366085e-07, 0.2836897959677e+01, 0.9514313292143e+02,
5960           0.2164089203889e-07, 0.6127522446024e+01, 0.6037244212485e+01,
5961           0.1847755034221e-07, 0.3683163635008e+01, 0.2427287361862e+00,
5962           0.1674798769966e-07, 0.3316993867246e+00, 0.1311972100268e+02,
5963           0.2222542124356e-07, 0.8294097805480e+00, 0.1266924451345e+02,
5964           0.2071074505925e-07, 0.3659492220261e+01, 0.6528907488406e+01,
5965           0.1608224471835e-07, 0.4774492067182e+01, 0.1352175143971e+02,
5966           0.1857583439071e-07, 0.2873120597682e+01, 0.8662240327241e+01,
5967           0.1793018836159e-07, 0.5282441177929e+00, 0.6819880277225e+01,
5968           0.1575391221692e-07, 0.1320789654258e+01, 0.1102062672231e+00,
5969 
5970           0.1840132009557e-07, 0.1917110916256e+01, 0.6514761976723e+02,
5971           0.1760917288281e-07, 0.2972635937132e+01, 0.5746271423666e+01,
5972           0.1561779518516e-07, 0.4372569261981e+01, 0.6272439236156e+01,
5973           0.1558687885205e-07, 0.5416424926425e+01, 0.6293712464735e+01,
5974           0.1951359382579e-07, 0.3094448898752e+01, 0.2301353951334e+02,
5975           0.1569144275614e-07, 0.2802103689808e+01, 0.1765478049437e+02,
5976           0.1479130389462e-07, 0.2136435020467e+01, 0.2077542790660e-01,
5977           0.1467828510764e-07, 0.7072627435674e+00, 0.1052268489556e+01,
5978           0.1627627337440e-07, 0.3947607143237e+01, 0.6327837846670e+00,
5979           0.1503498479758e-07, 0.4079248909190e+01, 0.7626583626240e-01,
5980 
5981           0.1297967708237e-07, 0.6269637122840e+01, 0.1149965630200e+02,
5982           0.1374416896634e-07, 0.4175657970702e+01, 0.6016468784579e+01,
5983           0.1783812325219e-07, 0.1476540547560e+01, 0.3301902111895e+02,
5984           0.1525884228756e-07, 0.4653477715241e+01, 0.9411464614024e+01,
5985           0.1451067396763e-07, 0.2573001128225e+01, 0.1277945078067e+02,
5986           0.1297713111950e-07, 0.5612799618771e+01, 0.6549682916313e+01,
5987           0.1462784012820e-07, 0.4189661623870e+01, 0.1863592847156e+02,
5988           0.1384185980007e-07, 0.2656915472196e+01, 0.2379164476796e+01,
5989           0.1221497599801e-07, 0.5612515760138e+01, 0.1257326515556e+02,
5990           0.1560574525896e-07, 0.4783414317919e+01, 0.1887552587463e+02,
5991 
5992           0.1544598372036e-07, 0.2694431138063e+01, 0.1820933031200e+02,
5993           0.1531678928696e-07, 0.4105103489666e+01, 0.2593412433514e+02,
5994           0.1349321503795e-07, 0.3082437194015e+00, 0.5120601093667e+01,
5995           0.1252030290917e-07, 0.6124072334087e+01, 0.6993008899458e+01,
5996           0.1459243816687e-07, 0.3733103981697e+01, 0.3813291813120e-01,
5997           0.1226103625262e-07, 0.1267127706817e+01, 0.2435678079171e+02,
5998           0.1019449641504e-07, 0.4367790112269e+01, 0.1725663147538e+02,
5999           0.1380789433607e-07, 0.3387201768700e+01, 0.2458316379602e+00,
6000           0.1019453421658e-07, 0.9204143073737e+00, 0.6112403035119e+01,
6001           0.1297929434405e-07, 0.5786874896426e+01, 0.1249137003520e+02,
6002 
6003           0.9912677786097e-08, 0.3164232870746e+01, 0.6247047890016e+01,
6004           0.9829386098599e-08, 0.2586762413351e+01, 0.6453748665772e+01,
6005           0.1226807746104e-07, 0.6239068436607e+01, 0.5429879531333e+01,
6006           0.1192691755997e-07, 0.1867380051424e+01, 0.6290122169689e+01,
6007           0.9836499227081e-08, 0.3424716293727e+00, 0.6319103810876e+01,
6008           0.9642862564285e-08, 0.5661372990657e+01, 0.8273820945392e+01,
6009           0.1165184404862e-07, 0.5768367239093e+01, 0.1778273215245e+02,
6010           0.1175794418818e-07, 0.1657351222943e+01, 0.6276029531202e+01,
6011           0.1018948635601e-07, 0.6458292350865e+00, 0.1254537627298e+02,
6012           0.9500383606676e-08, 0.1054306140741e+01, 0.1256517118505e+02,
6013 
6014           0.1227512202906e-07, 0.2505278379114e+01, 0.2248384854122e+02,
6015           0.9664792009993e-08, 0.4289737277000e+01, 0.6259197520765e+01,
6016           0.9613285666331e-08, 0.5500597673141e+01, 0.6306954180126e+01,
6017           0.1117906736211e-07, 0.2361405953468e+01, 0.1779695906178e+02,
6018           0.9611378640782e-08, 0.2851310576269e+01, 0.2061856251104e+00,
6019           0.8845354852370e-08, 0.6208777705343e+01, 0.1692165728891e+01,
6020           0.1054046966600e-07, 0.5413091423934e+01, 0.2204125344462e+00,
6021           0.1215539124483e-07, 0.5613969479755e+01, 0.8257698122054e+02,
6022           0.9932460955209e-08, 0.1106124877015e+01, 0.1017725758696e+02,
6023           0.8785804715043e-08, 0.2869224476477e+01, 0.9491756770005e+00,
6024 
6025           0.8538084097562e-08, 0.6159640899344e+01, 0.6393282117669e+01,
6026           0.8648994369529e-08, 0.1374901198784e+01, 0.4804209201333e+01,
6027           0.1039063219067e-07, 0.5171080641327e+01, 0.1550861511662e+02,
6028           0.8867983926439e-08, 0.8317320304902e+00, 0.3903911373650e+01,
6029           0.8327495955244e-08, 0.3605591969180e+01, 0.6172869583223e+01,
6030           0.9243088356133e-08, 0.6114299196843e+01, 0.6267823317922e+01,
6031           0.9205657357835e-08, 0.3675153683737e+01, 0.6298328382969e+01,
6032           0.1033269714606e-07, 0.3313328813024e+01, 0.5573142801433e+01,
6033           0.8001706275552e-08, 0.2019980960053e+01, 0.2648454860559e+01,
6034           0.9171858254191e-08, 0.8992015524177e+00, 0.1498544001348e+03,
6035 
6036           0.1075327150242e-07, 0.2898669963648e+01, 0.3694923081589e+02,
6037           0.9884866689828e-08, 0.4946715904478e+01, 0.1140367694411e+02,
6038           0.9541835576677e-08, 0.2371787888469e+01, 0.1256713221673e+02,
6039           0.7739903376237e-08, 0.2213775190612e+01, 0.7834121070590e+01,
6040           0.7311962684106e-08, 0.3429378787739e+01, 0.1192625446156e+02,
6041           0.9724904869624e-08, 0.6195878564404e+01, 0.2280573557157e+02,
6042           0.9251628983612e-08, 0.6511509527390e+00, 0.2787043132925e+01,
6043           0.7320763787842e-08, 0.6001083639421e+01, 0.6282655592598e+01,
6044           0.7320296650962e-08, 0.3789073265087e+01, 0.6283496108294e+01,
6045           0.7947032271039e-08, 0.1059659582204e+01, 0.1241073141809e+02,
6046 
6047           0.9005277053115e-08, 0.1280315624361e+01, 0.6281591679874e+01,
6048           0.8995601652048e-08, 0.2224439106766e+01, 0.6284560021018e+01,
6049           0.8288040568796e-08, 0.5234914433867e+01, 0.1241658836951e+02,
6050           0.6359381347255e-08, 0.4137989441490e+01, 0.1596186371003e+01,
6051           0.8699572228626e-08, 0.1758411009497e+01, 0.6133512519065e+01,
6052           0.6456797542736e-08, 0.5919285089994e+01, 0.1685848245639e+02,
6053           0.7424573475452e-08, 0.5414616938827e+01, 0.4061219149443e+01,
6054           0.7235671196168e-08, 0.1496516557134e+01, 0.1610006857377e+03,
6055           0.8104015182733e-08, 0.1919918242764e+01, 0.8460828644453e+00,
6056           0.8098576535937e-08, 0.3819615855458e+01, 0.3894181736510e+01,
6057 
6058           0.6275292346625e-08, 0.6244264115141e+01, 0.8531963191132e+00,
6059           0.6052432989112e-08, 0.5037731872610e+00, 0.1567108171867e+02,
6060           0.5705651535817e-08, 0.2984557271995e+01, 0.1258692712880e+02,
6061           0.5789650115138e-08, 0.6087038140697e+01, 0.1193336791622e+02,
6062           0.5512132153377e-08, 0.5855668994076e+01, 0.1232342296471e+02,
6063           0.7388890819102e-08, 0.2443128574740e+01, 0.4907302013889e+01,
6064           0.5467593991798e-08, 0.3017561234194e+01, 0.1884211409667e+02,
6065           0.6388519802999e-08, 0.5887386712935e+01, 0.5217580628120e+02,
6066           0.6106777149944e-08, 0.3483461059895e+00, 0.1422690933580e-01,
6067           0.7383420275489e-08, 0.5417387056707e+01, 0.2358125818164e+02,
6068 
6069           0.5505208141738e-08, 0.2848193644783e+01, 0.1151388321134e+02,
6070           0.6310757462877e-08, 0.2349882520828e+01, 0.1041998632314e+02,
6071           0.6166904929691e-08, 0.5728575944077e+00, 0.6151533897323e+01,
6072           0.5263442042754e-08, 0.4495796125937e+01, 0.1885275071096e+02,
6073           0.5591828082629e-08, 0.1355441967677e+01, 0.4337116142245e+00,
6074           0.5397051680497e-08, 0.1673422864307e+01, 0.6286362197481e+01,
6075           0.5396992745159e-08, 0.1833502206373e+01, 0.6279789503410e+01,
6076           0.6572913000726e-08, 0.3331122065824e+01, 0.1176433076753e+02,
6077           0.5123421866413e-08, 0.2165327142679e+01, 0.1245594543367e+02,
6078           0.5930495725999e-08, 0.2931146089284e+01, 0.6414617803568e+01,
6079 
6080           0.6431797403933e-08, 0.4134407994088e+01, 0.1350651127443e+00,
6081           0.5003182207604e-08, 0.3805420303749e+01, 0.1096996532989e+02,
6082           0.5587731032504e-08, 0.1082469260599e+01, 0.6062663316000e+01,
6083           0.5935263407816e-08, 0.8384333678401e+00, 0.5326786718777e+01,
6084           0.4756019827760e-08, 0.3552588749309e+01, 0.3104930017775e+01,
6085           0.6599951172637e-08, 0.4320826409528e+01, 0.4087944051283e+02,
6086           0.5902606868464e-08, 0.4811879454445e+01, 0.5849364236221e+01,
6087           0.5921147809031e-08, 0.9942628922396e-01, 0.1581959461667e+01,
6088           0.5505382581266e-08, 0.2466557607764e+01, 0.6503488384892e+01,
6089           0.5353771071862e-08, 0.4551978748683e+01, 0.1735668374386e+03,
6090 
6091           0.5063282210946e-08, 0.5710812312425e+01, 0.1248988586463e+02,
6092           0.5926120403383e-08, 0.1333998428358e+01, 0.2673594526851e+02,
6093           0.5211016176149e-08, 0.4649315360760e+01, 0.2460261242967e+02,
6094           0.5347075084894e-08, 0.5512754081205e+01, 0.4171425416666e+01,
6095           0.4872609773574e-08, 0.1308025299938e+01, 0.5333900173445e+01,
6096           0.4727711321420e-08, 0.2144908368062e+01, 0.7232251527446e+01,
6097           0.6029426018652e-08, 0.5567259412084e+01, 0.3227113045244e+03,
6098           0.4321485284369e-08, 0.5230667156451e+01, 0.9388005868221e+01,
6099           0.4476406760553e-08, 0.6134081115303e+01, 0.5547199253223e+01,
6100           0.5835268277420e-08, 0.4783808492071e+01, 0.7285056171570e+02,
6101 
6102           0.5172183602748e-08, 0.5161817911099e+01, 0.1884570439172e+02,
6103           0.5693571465184e-08, 0.1381646203111e+01, 0.9723862754494e+02,
6104           0.4060634965349e-08, 0.3876705259495e+00, 0.4274518229222e+01,
6105           0.3967398770473e-08, 0.5029491776223e+01, 0.3496032717521e+01,
6106           0.3943754005255e-08, 0.1923162955490e+01, 0.6244942932314e+01,
6107           0.4781323427824e-08, 0.4633332586423e+01, 0.2929661536378e+02,
6108           0.3871483781204e-08, 0.1616650009743e+01, 0.6321208768577e+01,
6109           0.5141741733997e-08, 0.9817316704659e-01, 0.1232032006293e+02,
6110           0.4002385978497e-08, 0.3656161212139e+01, 0.7018952447668e+01,
6111           0.4901092604097e-08, 0.4404098713092e+01, 0.1478866649112e+01,
6112 
6113           0.3740932630345e-08, 0.5181188732639e+00, 0.6922973089781e+01,
6114           0.4387283718538e-08, 0.3254859566869e+01, 0.2331413144044e+03,
6115           0.5019197802033e-08, 0.3086773224677e+01, 0.1715706182245e+02,
6116           0.3834931695175e-08, 0.2797882673542e+01, 0.1491901785440e+02,
6117           0.3760413942497e-08, 0.2892676280217e+01, 0.1726726808967e+02,
6118           0.3719717204628e-08, 0.5861046025739e+01, 0.6297302759782e+01,
6119           0.4145623530149e-08, 0.2168239627033e+01, 0.1376059875786e+02,
6120           0.3932788425380e-08, 0.6271811124181e+01, 0.7872148766781e+01,
6121           0.3686377476857e-08, 0.3936853151404e+01, 0.6268848941110e+01,
6122           0.3779077950339e-08, 0.1404148734043e+01, 0.4157198507331e+01,
6123 
6124           0.4091334550598e-08, 0.2452436180854e+01, 0.9779108567966e+01,
6125           0.3926694536146e-08, 0.6102292739040e+01, 0.1098419223922e+02,
6126           0.4841000253289e-08, 0.6072760457276e+01, 0.1252801878276e+02,
6127           0.4949340130240e-08, 0.1154832815171e+01, 0.1617106187867e+03,
6128           0.3761557737360e-08, 0.5527545321897e+01, 0.3185192151914e+01,
6129           0.3647396268188e-08, 0.1525035688629e+01, 0.6271346477544e+01,
6130           0.3932405074189e-08, 0.5570681040569e+01, 0.2139354194808e+02,
6131           0.3631322501141e-08, 0.1981240601160e+01, 0.6294805223347e+01,
6132           0.4130007425139e-08, 0.2050060880201e+01, 0.2195415756911e+02,
6133           0.4433905965176e-08, 0.3277477970321e+01, 0.7445550607224e+01,
6134 
6135           0.3851814176947e-08, 0.5210690074886e+01, 0.9562891316684e+00,
6136           0.3485807052785e-08, 0.6653274904611e+00, 0.1161697602389e+02,
6137           0.3979772816991e-08, 0.1767941436148e+01, 0.2277943724828e+02,
6138           0.3402607460500e-08, 0.3421746306465e+01, 0.1087398597200e+02,
6139           0.4049993000926e-08, 0.1127144787547e+01, 0.3163918923335e+00,
6140           0.3420511182382e-08, 0.4214794779161e+01, 0.1362553364512e+02,
6141           0.3640772365012e-08, 0.5324905497687e+01, 0.1725304118033e+02,
6142           0.3323037987501e-08, 0.6135761838271e+01, 0.6279143387820e+01,
6143           0.4503141663637e-08, 0.1802305450666e+01, 0.1385561574497e+01,
6144           0.4314560055588e-08, 0.4812299731574e+01, 0.4176041334900e+01,
6145 
6146           0.3294226949110e-08, 0.3657547059723e+01, 0.6287008313071e+01,
6147           0.3215657197281e-08, 0.4866676894425e+01, 0.5749861718712e+01,
6148           0.4129362656266e-08, 0.3809342558906e+01, 0.5905702259363e+01,
6149           0.3137762976388e-08, 0.2494635174443e+01, 0.2099539292909e+02,
6150           0.3514010952384e-08, 0.2699961831678e+01, 0.7335344340001e+01,
6151           0.3327607571530e-08, 0.3318457714816e+01, 0.5436992986000e+01,
6152           0.3541066946675e-08, 0.4382703582466e+01, 0.1234573916645e+02,
6153           0.3216179847052e-08, 0.5271066317054e+01, 0.3802769619140e-01,
6154           0.2959045059570e-08, 0.5819591585302e+01, 0.2670964694522e+02,
6155           0.3884040326665e-08, 0.5980934960428e+01, 0.6660449441528e+01,
6156 
6157           0.2922027539886e-08, 0.3337290282483e+01, 0.1375773836557e+01,
6158           0.4110846382042e-08, 0.5742978187327e+01, 0.4480965020977e+02,
6159           0.2934508411032e-08, 0.2278075804200e+01, 0.6408777551755e+00,
6160           0.3966896193000e-08, 0.5835747858477e+01, 0.3773735910827e+00,
6161           0.3286695827610e-08, 0.5838898193902e+01, 0.3932462625300e-02,
6162           0.3720643094196e-08, 0.1122212337858e+01, 0.1646033343740e+02,
6163           0.3285508906174e-08, 0.9182250996416e+00, 0.1081813534213e+02,
6164           0.3753880575973e-08, 0.5174761973266e+01, 0.5642198095270e+01,
6165           0.3022129385587e-08, 0.3381611020639e+01, 0.2982630633589e+02,
6166           0.2798569205621e-08, 0.3546193723922e+01, 0.1937891852345e+02,
6167 
6168           0.3397872070505e-08, 0.4533203197934e+01, 0.6923953605621e+01,
6169           0.3708099772977e-08, 0.2756168198616e+01, 0.3066615496545e+02,
6170           0.3599283541510e-08, 0.1934395469918e+01, 0.6147450479709e+01,
6171           0.3688702753059e-08, 0.7149920971109e+00, 0.2636725487657e+01,
6172           0.2681084724003e-08, 0.4899819493154e+01, 0.6816289982179e+01,
6173           0.3495993460759e-08, 0.1572418915115e+01, 0.6418701221183e+01,
6174           0.3130770324995e-08, 0.8912190180489e+00, 0.1235996607578e+02,
6175           0.2744353821941e-08, 0.3800821940055e+01, 0.2059724391010e+02,
6176           0.2842732906341e-08, 0.2644717440029e+01, 0.2828699048865e+02,
6177           0.3046882682154e-08, 0.3987793020179e+01, 0.6055599646783e+01,
6178 
6179           0.2399072455143e-08, 0.9908826440764e+00, 0.6255674361143e+01,
6180           0.2384306274204e-08, 0.2516149752220e+01, 0.6310477339748e+01,
6181           0.2977324500559e-08, 0.5849195642118e+01, 0.1652265972112e+02,
6182           0.3062835258972e-08, 0.1681660100162e+01, 0.1172006883645e+02,
6183           0.3109682589231e-08, 0.5804143987737e+00, 0.2751146787858e+02,
6184           0.2903920355299e-08, 0.5800768280123e+01, 0.6510552054109e+01,
6185           0.2823221989212e-08, 0.9241118370216e+00, 0.5469525544182e+01,
6186           0.3187949696649e-08, 0.3139776445735e+01, 0.1693792562116e+03,
6187           0.2922559771655e-08, 0.3549440782984e+01, 0.2630839062450e+00,
6188           0.2436302066603e-08, 0.4735540696319e+01, 0.3946258593675e+00,
6189 
6190           0.3049473043606e-08, 0.4998289124561e+01, 0.8390110365991e+01,
6191           0.2863682575784e-08, 0.6709515671102e+00, 0.2243449970715e+00,
6192           0.2641750517966e-08, 0.5410978257284e+01, 0.2986433403208e+02,
6193           0.2704093466243e-08, 0.4778317207821e+01, 0.6129297044991e+01,
6194           0.2445522177011e-08, 0.6009020662222e+01, 0.1171295538178e+02,
6195           0.2623608810230e-08, 0.5010449777147e+01, 0.6436854655901e+01,
6196           0.2079259704053e-08, 0.5980943768809e+01, 0.2019909489111e+02,
6197           0.2820225596771e-08, 0.2679965110468e+01, 0.5934151399930e+01,
6198           0.2365221950927e-08, 0.1894231148810e+01, 0.2470570524223e+02,
6199           0.2359682077149e-08, 0.4220752950780e+01, 0.8671969964381e+01,
6200 
6201           0.2387577137206e-08, 0.2571783940617e+01, 0.7096626156709e+01,
6202           0.1982102089816e-08, 0.5169765997119e+00, 0.1727188400790e+02,
6203           0.2687502389925e-08, 0.6239078264579e+01, 0.7075506709219e+02,
6204           0.2207751669135e-08, 0.2031184412677e+01, 0.4377611041777e+01,
6205           0.2618370214274e-08, 0.8266079985979e+00, 0.6632000300961e+01,
6206           0.2591951887361e-08, 0.8819350522008e+00, 0.4873985990671e+02,
6207           0.2375055656248e-08, 0.3520944177789e+01, 0.1590676413561e+02,
6208           0.2472019978911e-08, 0.1551431908671e+01, 0.6612329252343e+00,
6209           0.2368157127199e-08, 0.4178610147412e+01, 0.3459636466239e+02,
6210           0.1764846605693e-08, 0.1506764000157e+01, 0.1980094587212e+02,
6211 
6212           0.2291769608798e-08, 0.2118250611782e+01, 0.2844914056730e-01,
6213           0.2209997316943e-08, 0.3363255261678e+01, 0.2666070658668e+00,
6214           0.2292699097923e-08, 0.4200423956460e+00, 0.1484170571900e-02,
6215           0.1629683015329e-08, 0.2331362582487e+01, 0.3035599730800e+02,
6216           0.2206492862426e-08, 0.3400274026992e+01, 0.6281667977667e+01,
6217           0.2205746568257e-08, 0.1066051230724e+00, 0.6284483723224e+01,
6218           0.2026310767991e-08, 0.2779066487979e+01, 0.2449240616245e+02,
6219           0.1762977622163e-08, 0.9951450691840e+00, 0.2045286941806e+02,
6220           0.1368535049606e-08, 0.6402447365817e+00, 0.2473415438279e+02,
6221           0.1720598775450e-08, 0.2303524214705e+00, 0.1679593901136e+03,
6222 
6223           0.1702429015449e-08, 0.6164622655048e+01, 0.3338575901272e+03,
6224           0.1414033197685e-08, 0.3954561185580e+01, 0.1624205518357e+03,
6225           0.1573768958043e-08, 0.2028286308984e+01, 0.3144167757552e+02,
6226           0.1650705184447e-08, 0.2304040666128e+01, 0.5267006960365e+02,
6227           0.1651087618855e-08, 0.2538461057280e+01, 0.8956999012000e+02,
6228           0.1616409518983e-08, 0.5111054348152e+01, 0.3332657872986e+02,
6229           0.1537175173581e-08, 0.5601130666603e+01, 0.3852657435933e+02,
6230           0.1593191980553e-08, 0.2614340453411e+01, 0.2282781046519e+03,
6231           0.1499480170643e-08, 0.3624721577264e+01, 0.2823723341956e+02,
6232           0.1493807843235e-08, 0.4214569879008e+01, 0.2876692439167e+02,
6233 
6234           0.1074571199328e-08, 0.1496911744704e+00, 0.8397383534231e+02,
6235           0.1074406983417e-08, 0.1187817671922e+01, 0.8401985929482e+02,
6236           0.9757576855851e-09, 0.2655703035858e+01, 0.7826370942180e+02,
6237           0.1258432887565e-08, 0.4969896184844e+01, 0.3115650189215e+03,
6238           0.1240336343282e-08, 0.5192460776926e+01, 0.1784300471910e+03,
6239           0.9016107005164e-09, 0.1960356923057e+01, 0.5886454391678e+02,
6240           0.1135392360918e-08, 0.5082427809068e+01, 0.7842370451713e+02,
6241           0.9216046089565e-09, 0.2793775037273e+01, 0.1014262087719e+03,
6242           0.1061276615030e-08, 0.3726144311409e+01, 0.5660027930059e+02,
6243           0.1010110596263e-08, 0.7404080708937e+00, 0.4245678405627e+02,
6244 
6245           0.7217424756199e-09, 0.2697449980577e-01, 0.2457074661053e+03,
6246           0.6912003846756e-09, 0.4253296276335e+01, 0.1679936946371e+03,
6247           0.6871814664847e-09, 0.5148072412354e+01, 0.6053048899753e+02,
6248           0.4887158016343e-09, 0.2153581148294e+01, 0.9656299901946e+02,
6249           0.5161802866314e-09, 0.3852750634351e+01, 0.2442876000072e+03,
6250           0.5652599559057e-09, 0.1233233356270e+01, 0.8365903305582e+02,
6251           0.4710812608586e-09, 0.5610486976767e+01, 0.3164282286739e+03,
6252           0.4909977500324e-09, 0.1639629524123e+01, 0.4059982187939e+03,
6253           0.4772641839378e-09, 0.3737100368583e+01, 0.1805255418145e+03,
6254           0.4487562567153e-09, 0.1158417054478e+00, 0.8433466158131e+02,
6255 
6256           0.3943441230497e-09, 0.6243502862796e+00, 0.2568537517081e+03,
6257           0.3952236913598e-09, 0.3510377382385e+01, 0.2449975330562e+03,
6258           0.3788898363417e-09, 0.5916128302299e+01, 0.1568131045107e+03,
6259           0.3738329328831e-09, 0.1042266763456e+01, 0.3948519331910e+03,
6260           0.2451199165151e-09, 0.1166788435700e+01, 0.1435713242844e+03,
6261           0.2436734402904e-09, 0.3254726114901e+01, 0.2268582385539e+03,
6262           0.2213605274325e-09, 0.1687210598530e+01, 0.1658638954901e+03,
6263           0.1491521204829e-09, 0.2657541786794e+01, 0.2219950288015e+03,
6264           0.1474995329744e-09, 0.5013089805819e+01, 0.3052819430710e+03,
6265           0.1661939475656e-09, 0.5495315428418e+01, 0.2526661704812e+03,
6266 
6267           0.9015946748003e-10, 0.2236989966505e+01, 0.4171445043968e+03 };
6268 
6269     /* Sun-to-Earth, T^0, Z */
6270       static final double e0z[] = {
6271           0.2796207639075e-05, 0.3198701560209e+01, 0.8433466158131e+02,
6272           0.1016042198142e-05, 0.5422360395913e+01, 0.5507553240374e+01,
6273           0.8044305033647e-06, 0.3880222866652e+01, 0.5223693906222e+01,
6274           0.4385347909274e-06, 0.3704369937468e+01, 0.2352866153506e+01,
6275           0.3186156414906e-06, 0.3999639363235e+01, 0.1577343543434e+01,
6276           0.2272412285792e-06, 0.3984738315952e+01, 0.1047747311755e+01,
6277           0.1645620103007e-06, 0.3565412516841e+01, 0.5856477690889e+01,
6278           0.1815836921166e-06, 0.4984507059020e+01, 0.6283075850446e+01,
6279           0.1447461676364e-06, 0.3702753570108e+01, 0.9437762937313e+01,
6280           0.1430760876382e-06, 0.3409658712357e+01, 0.1021328554739e+02,
6281 
6282           0.1120445753226e-06, 0.4829561570246e+01, 0.1414349524433e+02,
6283           0.1090232840797e-06, 0.2080729178066e+01, 0.6812766822558e+01,
6284           0.9715727346551e-07, 0.3476295881948e+01, 0.4694002934110e+01,
6285           0.1036267136217e-06, 0.4056639536648e+01, 0.7109288135493e+02,
6286           0.8752665271340e-07, 0.4448159519911e+01, 0.5753384878334e+01,
6287           0.8331864956004e-07, 0.4991704044208e+01, 0.7084896783808e+01,
6288           0.6901658670245e-07, 0.4325358994219e+01, 0.6275962395778e+01,
6289           0.9144536848998e-07, 0.1141826375363e+01, 0.6620890113188e+01,
6290           0.7205085037435e-07, 0.3624344170143e+01, 0.5296909721118e+00,
6291           0.7697874654176e-07, 0.5554257458998e+01, 0.1676215758509e+03,
6292 
6293           0.5197545738384e-07, 0.6251760961735e+01, 0.1807370494127e+02,
6294           0.5031345378608e-07, 0.2497341091913e+01, 0.4705732307012e+01,
6295           0.4527110205840e-07, 0.2335079920992e+01, 0.6309374173736e+01,
6296           0.4753355798089e-07, 0.7094148987474e+00, 0.5884926831456e+01,
6297           0.4296951977516e-07, 0.1101916352091e+01, 0.6681224869435e+01,
6298           0.3855341568387e-07, 0.1825495405486e+01, 0.5486777812467e+01,
6299           0.5253930970990e-07, 0.4424740687208e+01, 0.7860419393880e+01,
6300           0.4024630496471e-07, 0.5120498157053e+01, 0.1336797263425e+02,
6301           0.4061069791453e-07, 0.6029771435451e+01, 0.3930209696940e+01,
6302           0.3797883804205e-07, 0.4435193600836e+00, 0.3154687086868e+01,
6303 
6304           0.2933033225587e-07, 0.5124157356507e+01, 0.1059381944224e+01,
6305           0.3503000930426e-07, 0.5421830162065e+01, 0.6069776770667e+01,
6306           0.3670096214050e-07, 0.4582101667297e+01, 0.1219403291462e+02,
6307           0.2905609437008e-07, 0.1926566420072e+01, 0.1097707878456e+02,
6308           0.2466827821713e-07, 0.6090174539834e+00, 0.6496374930224e+01,
6309           0.2691647295332e-07, 0.1393432595077e+01, 0.2200391463820e+02,
6310           0.2150554667946e-07, 0.4308671715951e+01, 0.5643178611111e+01,
6311           0.2237481922680e-07, 0.8133968269414e+00, 0.8635942003952e+01,
6312           0.1817741038157e-07, 0.3755205127454e+01, 0.3340612434717e+01,
6313           0.2227820762132e-07, 0.2759558596664e+01, 0.1203646072878e+02,
6314 
6315           0.1944713772307e-07, 0.5699645869121e+01, 0.1179062909082e+02,
6316           0.1527340520662e-07, 0.1986749091746e+01, 0.3981490189893e+00,
6317           0.1577282574914e-07, 0.3205017217983e+01, 0.5088628793478e+01,
6318           0.1424738825424e-07, 0.6256747903666e+01, 0.2544314396739e+01,
6319           0.1616563121701e-07, 0.2601671259394e+00, 0.1729818233119e+02,
6320           0.1401210391692e-07, 0.4686939173506e+01, 0.7058598460518e+01,
6321           0.1488726974214e-07, 0.2815862451372e+01, 0.2593412433514e+02,
6322           0.1692626442388e-07, 0.4956894109797e+01, 0.1564752902480e+03,
6323           0.1123571582910e-07, 0.2381192697696e+01, 0.3738761453707e+01,
6324           0.9903308606317e-08, 0.4294851657684e+01, 0.9225539266174e+01,
6325 
6326           0.9174533187191e-08, 0.3075171510642e+01, 0.4164311961999e+01,
6327           0.8645985631457e-08, 0.5477534821633e+00, 0.8429241228195e+01,
6328          -0.1085876492688e-07, 0.0000000000000e+00, 0.0000000000000e+00,
6329           0.9264309077815e-08, 0.5968571670097e+01, 0.7079373888424e+01,
6330           0.8243116984954e-08, 0.1489098777643e+01, 0.1044738781244e+02,
6331           0.8268102113708e-08, 0.3512977691983e+01, 0.1150676975667e+02,
6332           0.9043613988227e-08, 0.1290704408221e+00, 0.1101510648075e+02,
6333           0.7432912038789e-08, 0.1991086893337e+01, 0.2608790314060e+02,
6334           0.8586233727285e-08, 0.4238357924414e+01, 0.2986433403208e+02,
6335           0.7612230060131e-08, 0.2911090150166e+01, 0.4732030630302e+01,
6336 
6337           0.7097787751408e-08, 0.1908938392390e+01, 0.8031092209206e+01,
6338           0.7640237040175e-08, 0.6129219000168e+00, 0.7962980379786e+00,
6339           0.7070445688081e-08, 0.1380417036651e+01, 0.2146165377750e+01,
6340           0.7690770957702e-08, 0.1680504249084e+01, 0.2122839202813e+02,
6341           0.8051292542594e-08, 0.5127423484511e+01, 0.2942463415728e+01,
6342           0.5902709104515e-08, 0.2020274190917e+01, 0.7755226100720e+00,
6343           0.5134567496462e-08, 0.2606778676418e+01, 0.1256615170089e+02,
6344           0.5525802046102e-08, 0.1613011769663e+01, 0.8018209333619e+00,
6345           0.5880724784221e-08, 0.4604483417236e+01, 0.4690479774488e+01,
6346           0.5211699081370e-08, 0.5718964114193e+01, 0.8827390247185e+01,
6347 
6348           0.4891849573562e-08, 0.3689658932196e+01, 0.2132990797783e+00,
6349           0.5150246069997e-08, 0.4099769855122e+01, 0.6480980550449e+02,
6350           0.5102434319633e-08, 0.5660834602509e+01, 0.3379454372902e+02,
6351           0.5083405254252e-08, 0.9842221218974e+00, 0.4136910472696e+01,
6352           0.4206562585682e-08, 0.1341363634163e+00, 0.3128388763578e+01,
6353           0.4663249683579e-08, 0.8130132735866e+00, 0.5216580451554e+01,
6354           0.4099474416530e-08, 0.5791497770644e+01, 0.4265981595566e+00,
6355           0.4628251220767e-08, 0.1249802769331e+01, 0.1572083878776e+02,
6356           0.5024068728142e-08, 0.4795684802743e+01, 0.6290189305114e+01,
6357           0.5120234327758e-08, 0.3810420387208e+01, 0.5230807360890e+01,
6358 
6359           0.5524029815280e-08, 0.1029264714351e+01, 0.2397622045175e+03,
6360           0.4757415718860e-08, 0.3528044781779e+01, 0.1649636139783e+02,
6361           0.3915786131127e-08, 0.5593889282646e+01, 0.1589072916335e+01,
6362           0.4869053149991e-08, 0.3299636454433e+01, 0.7632943190217e+01,
6363           0.3649365703729e-08, 0.1286049002584e+01, 0.6206810014183e+01,
6364           0.3992493949002e-08, 0.3100307589464e+01, 0.2515860172507e+02,
6365           0.3320247477418e-08, 0.6212683940807e+01, 0.1216800268190e+02,
6366           0.3287123739696e-08, 0.4699118445928e+01, 0.7234794171227e+01,
6367           0.3472776811103e-08, 0.2630507142004e+01, 0.7342457794669e+01,
6368           0.3423253294767e-08, 0.2946432844305e+01, 0.9623688285163e+01,
6369 
6370           0.3896173898244e-08, 0.1224834179264e+01, 0.6438496133249e+01,
6371           0.3388455337924e-08, 0.1543807616351e+01, 0.1494531617769e+02,
6372           0.3062704716523e-08, 0.1191777572310e+01, 0.8662240327241e+01,
6373           0.3270075600400e-08, 0.5483498767737e+01, 0.1194447056968e+01,
6374           0.3101209215259e-08, 0.8000833804348e+00, 0.3772475342596e+02,
6375           0.2780883347311e-08, 0.4077980721888e+00, 0.5863591145557e+01,
6376           0.2903605931824e-08, 0.2617490302147e+01, 0.1965104848470e+02,
6377           0.2682014743119e-08, 0.2634703158290e+01, 0.7238675589263e+01,
6378           0.2534360108492e-08, 0.6102446114873e+01, 0.6836645152238e+01,
6379           0.2392564882509e-08, 0.3681820208691e+01, 0.5849364236221e+01,
6380 
6381           0.2656667254856e-08, 0.6216045388886e+01, 0.6133512519065e+01,
6382           0.2331242096773e-08, 0.5864949777744e+01, 0.4535059491685e+01,
6383           0.2287898363668e-08, 0.4566628532802e+01, 0.7477522907414e+01,
6384           0.2336944521306e-08, 0.2442722126930e+01, 0.1137170464392e+02,
6385           0.3156632236269e-08, 0.1626628050682e+01, 0.2509084901204e+03,
6386           0.2982612402766e-08, 0.2803604512609e+01, 0.1748016358760e+01,
6387           0.2774031674807e-08, 0.4654002897158e+01, 0.8223916695780e+02,
6388           0.2295236548638e-08, 0.4326518333253e+01, 0.3378142627421e+00,
6389           0.2190714699873e-08, 0.4519614578328e+01, 0.2908881142201e+02,
6390           0.2191495845045e-08, 0.3012626912549e+01, 0.1673046366289e+02,
6391 
6392           0.2492901628386e-08, 0.1290101424052e+00, 0.1543797956245e+03,
6393           0.1993778064319e-08, 0.3864046799414e+01, 0.1778984560711e+02,
6394           0.1898146479022e-08, 0.5053777235891e+01, 0.2042657109477e+02,
6395           0.1918280127634e-08, 0.2222470192548e+01, 0.4165496312290e+02,
6396           0.1916351061607e-08, 0.8719067257774e+00, 0.7737595720538e+02,
6397           0.1834720181466e-08, 0.4031491098040e+01, 0.2358125818164e+02,
6398           0.1249201523806e-08, 0.5938379466835e+01, 0.3301902111895e+02,
6399           0.1477304050539e-08, 0.6544722606797e+00, 0.9548094718417e+02,
6400           0.1264316431249e-08, 0.2059072853236e+01, 0.8399684731857e+02,
6401           0.1203526495039e-08, 0.3644813532605e+01, 0.4558517281984e+02,
6402 
6403           0.9221681059831e-09, 0.3241815055602e+01, 0.7805158573086e+02,
6404           0.7849278367646e-09, 0.5043812342457e+01, 0.5217580628120e+02,
6405           0.7983392077387e-09, 0.5000024502753e+01, 0.1501922143975e+03,
6406           0.7925395431654e-09, 0.1398734871821e-01, 0.9061773743175e+02,
6407           0.7640473285886e-09, 0.5067111723130e+01, 0.4951538251678e+02,
6408           0.5398937754482e-09, 0.5597382200075e+01, 0.1613385000004e+03,
6409           0.5626247550193e-09, 0.2601338209422e+01, 0.7318837597844e+02,
6410           0.5525197197855e-09, 0.5814832109256e+01, 0.1432335100216e+03,
6411           0.5407629837898e-09, 0.3384820609076e+01, 0.3230491187871e+03,
6412           0.3856739119801e-09, 0.1072391840473e+01, 0.2334791286671e+03,
6413 
6414           0.3856425239987e-09, 0.2369540393327e+01, 0.1739046517013e+03,
6415           0.4350867755983e-09, 0.5255575751082e+01, 0.1620484330494e+03,
6416           0.3844113924996e-09, 0.5482356246182e+01, 0.9757644180768e+02,
6417           0.2854869155431e-09, 0.9573634763143e+00, 0.1697170704744e+03,
6418           0.1719227671416e-09, 0.1887203025202e+01, 0.2265204242912e+03,
6419           0.1527846879755e-09, 0.3982183931157e+01, 0.3341954043900e+03,
6420           0.1128229264847e-09, 0.2787457156298e+01, 0.3119028331842e+03 };
6421 
6422     /* Sun-to-Earth, T^1, X */
6423       static final double e1x[] = {
6424           0.1234046326004e-05, 0.0000000000000e+00, 0.0000000000000e+00,
6425           0.5150068824701e-06, 0.6002664557501e+01, 0.1256615170089e+02,
6426           0.1290743923245e-07, 0.5959437664199e+01, 0.1884922755134e+02,
6427           0.1068615564952e-07, 0.2015529654209e+01, 0.6283075850446e+01,
6428           0.2079619142538e-08, 0.1732960531432e+01, 0.6279552690824e+01,
6429           0.2078009243969e-08, 0.4915604476996e+01, 0.6286599010068e+01,
6430           0.6206330058856e-09, 0.3616457953824e+00, 0.4705732307012e+01,
6431           0.5989335313746e-09, 0.3802607304474e+01, 0.6256777527156e+01,
6432           0.5958495663840e-09, 0.2845866560031e+01, 0.6309374173736e+01,
6433           0.4866923261539e-09, 0.5213203771824e+01, 0.7755226100720e+00,
6434 
6435           0.4267785823142e-09, 0.4368189727818e+00, 0.1059381944224e+01,
6436           0.4610675141648e-09, 0.1837249181372e-01, 0.7860419393880e+01,
6437           0.3626989993973e-09, 0.2161590545326e+01, 0.5753384878334e+01,
6438           0.3563071194389e-09, 0.1452631954746e+01, 0.5884926831456e+01,
6439           0.3557015642807e-09, 0.4470593393054e+01, 0.6812766822558e+01,
6440           0.3210412089122e-09, 0.5195926078314e+01, 0.6681224869435e+01,
6441           0.2875473577986e-09, 0.5916256610193e+01, 0.2513230340178e+02,
6442           0.2842913681629e-09, 0.1149902426047e+01, 0.6127655567643e+01,
6443           0.2751248215916e-09, 0.5502088574662e+01, 0.6438496133249e+01,
6444           0.2481432881127e-09, 0.2921989846637e+01, 0.5486777812467e+01,
6445 
6446           0.2059885976560e-09, 0.3718070376585e+01, 0.7079373888424e+01,
6447           0.2015522342591e-09, 0.5979395259740e+01, 0.6290189305114e+01,
6448           0.1995364084253e-09, 0.6772087985494e+00, 0.6275962395778e+01,
6449           0.1957436436943e-09, 0.2899210654665e+01, 0.5507553240374e+01,
6450           0.1651609818948e-09, 0.6228206482192e+01, 0.1150676975667e+02,
6451           0.1822980550699e-09, 0.1469348746179e+01, 0.1179062909082e+02,
6452           0.1675223159760e-09, 0.3813910555688e+01, 0.7058598460518e+01,
6453           0.1706491764745e-09, 0.3004380506684e+00, 0.7113454667900e-02,
6454           0.1392952362615e-09, 0.1440393973406e+01, 0.7962980379786e+00,
6455           0.1209868266342e-09, 0.4150425791727e+01, 0.4694002934110e+01,
6456 
6457           0.1009827202611e-09, 0.3290040429843e+01, 0.3738761453707e+01,
6458           0.1047261388602e-09, 0.4229590090227e+01, 0.6282095334605e+01,
6459           0.1047006652004e-09, 0.2418967680575e+01, 0.6284056366286e+01,
6460           0.9609993143095e-10, 0.4627943659201e+01, 0.6069776770667e+01,
6461           0.9590900593873e-10, 0.1894393939924e+01, 0.4136910472696e+01,
6462           0.9146249188071e-10, 0.2010647519562e+01, 0.6496374930224e+01,
6463           0.8545274480290e-10, 0.5529846956226e-01, 0.1194447056968e+01,
6464           0.8224377881194e-10, 0.1254304102174e+01, 0.1589072916335e+01,
6465           0.6183529510410e-10, 0.3360862168815e+01, 0.8827390247185e+01,
6466           0.6259255147141e-10, 0.4755628243179e+01, 0.8429241228195e+01,
6467 
6468           0.5539291694151e-10, 0.5371746955142e+01, 0.4933208510675e+01,
6469           0.7328259466314e-10, 0.4927699613906e+00, 0.4535059491685e+01,
6470           0.6017835843560e-10, 0.5776682001734e-01, 0.1255903824622e+02,
6471           0.7079827775243e-10, 0.4395059432251e+01, 0.5088628793478e+01,
6472           0.5170358878213e-10, 0.5154062619954e+01, 0.1176985366291e+02,
6473           0.4872301838682e-10, 0.6289611648973e+00, 0.6040347114260e+01,
6474           0.5249869411058e-10, 0.5617272046949e+01, 0.3154687086868e+01,
6475           0.4716172354411e-10, 0.3965901800877e+01, 0.5331357529664e+01,
6476           0.4871214940964e-10, 0.4627507050093e+01, 0.1256967486051e+02,
6477           0.4598076850751e-10, 0.6023631226459e+01, 0.6525804586632e+01,
6478 
6479           0.4562196089485e-10, 0.4138562084068e+01, 0.3930209696940e+01,
6480           0.4325493872224e-10, 0.1330845906564e+01, 0.7632943190217e+01,
6481           0.5673781176748e-10, 0.2558752615657e+01, 0.5729506548653e+01,
6482           0.3961436642503e-10, 0.2728071734630e+01, 0.7234794171227e+01,
6483           0.5101868209058e-10, 0.4113444965144e+01, 0.6836645152238e+01,
6484           0.5257043167676e-10, 0.6195089830590e+01, 0.8031092209206e+01,
6485           0.5076613989393e-10, 0.2305124132918e+01, 0.7477522907414e+01,
6486           0.3342169352778e-10, 0.5415998155071e+01, 0.1097707878456e+02,
6487           0.3545881983591e-10, 0.3727160564574e+01, 0.4164311961999e+01,
6488           0.3364063738599e-10, 0.2901121049204e+00, 0.1137170464392e+02,
6489 
6490           0.3357039670776e-10, 0.1652229354331e+01, 0.5223693906222e+01,
6491           0.4307412268687e-10, 0.4938909587445e+01, 0.1592596075957e+01,
6492           0.3405769115435e-10, 0.2408890766511e+01, 0.3128388763578e+01,
6493           0.3001926198480e-10, 0.4862239006386e+01, 0.1748016358760e+01,
6494           0.2778264787325e-10, 0.5241168661353e+01, 0.7342457794669e+01,
6495           0.2676159480666e-10, 0.3423593942199e+01, 0.2146165377750e+01,
6496           0.2954273399939e-10, 0.1881721265406e+01, 0.5368044267797e+00,
6497           0.3309362888795e-10, 0.1931525677349e+01, 0.8018209333619e+00,
6498           0.2810283608438e-10, 0.2414659495050e+01, 0.5225775174439e+00,
6499           0.3378045637764e-10, 0.4238019163430e+01, 0.1554202828031e+00,
6500 
6501           0.2558134979840e-10, 0.1828225235805e+01, 0.5230807360890e+01,
6502           0.2273755578447e-10, 0.5858184283998e+01, 0.7084896783808e+01,
6503           0.2294176037690e-10, 0.4514589779057e+01, 0.1726015463500e+02,
6504           0.2533506099435e-10, 0.2355717851551e+01, 0.5216580451554e+01,
6505           0.2716685375812e-10, 0.2221003625100e+01, 0.8635942003952e+01,
6506           0.2419043435198e-10, 0.5955704951635e+01, 0.4690479774488e+01,
6507           0.2521232544812e-10, 0.1395676848521e+01, 0.5481254917084e+01,
6508           0.2630195021491e-10, 0.5727468918743e+01, 0.2629832328990e-01,
6509           0.2548395840944e-10, 0.2628351859400e-03, 0.1349867339771e+01 };
6510 
6511     /* Sun-to-Earth, T^1, Y */
6512       static final double e1y[] = {
6513           0.9304690546528e-06, 0.0000000000000e+00, 0.0000000000000e+00,
6514           0.5150715570663e-06, 0.4431807116294e+01, 0.1256615170089e+02,
6515           0.1290825411056e-07, 0.4388610039678e+01, 0.1884922755134e+02,
6516           0.4645466665386e-08, 0.5827263376034e+01, 0.6283075850446e+01,
6517           0.2079625310718e-08, 0.1621698662282e+00, 0.6279552690824e+01,
6518           0.2078189850907e-08, 0.3344713435140e+01, 0.6286599010068e+01,
6519           0.6207190138027e-09, 0.5074049319576e+01, 0.4705732307012e+01,
6520           0.5989826532569e-09, 0.2231842216620e+01, 0.6256777527156e+01,
6521           0.5961360812618e-09, 0.1274975769045e+01, 0.6309374173736e+01,
6522           0.4874165471016e-09, 0.3642277426779e+01, 0.7755226100720e+00,
6523 
6524           0.4283834034360e-09, 0.5148765510106e+01, 0.1059381944224e+01,
6525           0.4652389287529e-09, 0.4715794792175e+01, 0.7860419393880e+01,
6526           0.3751707476401e-09, 0.6617207370325e+00, 0.5753384878334e+01,
6527           0.3559998806198e-09, 0.6155548875404e+01, 0.5884926831456e+01,
6528           0.3558447558857e-09, 0.2898827297664e+01, 0.6812766822558e+01,
6529           0.3211116927106e-09, 0.3625813502509e+01, 0.6681224869435e+01,
6530           0.2875609914672e-09, 0.4345435813134e+01, 0.2513230340178e+02,
6531           0.2843109704069e-09, 0.5862263940038e+01, 0.6127655567643e+01,
6532           0.2744676468427e-09, 0.3926419475089e+01, 0.6438496133249e+01,
6533           0.2481285237789e-09, 0.1351976572828e+01, 0.5486777812467e+01,
6534 
6535           0.2060338481033e-09, 0.2147556998591e+01, 0.7079373888424e+01,
6536           0.2015822358331e-09, 0.4408358972216e+01, 0.6290189305114e+01,
6537           0.2001195944195e-09, 0.5385829822531e+01, 0.6275962395778e+01,
6538           0.1953667642377e-09, 0.1304933746120e+01, 0.5507553240374e+01,
6539           0.1839744078713e-09, 0.6173567228835e+01, 0.1179062909082e+02,
6540           0.1643334294845e-09, 0.4635942997523e+01, 0.1150676975667e+02,
6541           0.1768051018652e-09, 0.5086283558874e+01, 0.7113454667900e-02,
6542           0.1674874205489e-09, 0.2243332137241e+01, 0.7058598460518e+01,
6543           0.1421445397609e-09, 0.6186899771515e+01, 0.7962980379786e+00,
6544           0.1255163958267e-09, 0.5730238465658e+01, 0.4694002934110e+01,
6545 
6546           0.1013945281961e-09, 0.1726055228402e+01, 0.3738761453707e+01,
6547           0.1047294335852e-09, 0.2658801228129e+01, 0.6282095334605e+01,
6548           0.1047103879392e-09, 0.8481047835035e+00, 0.6284056366286e+01,
6549           0.9530343962826e-10, 0.3079267149859e+01, 0.6069776770667e+01,
6550           0.9604637611690e-10, 0.3258679792918e+00, 0.4136910472696e+01,
6551           0.9153518537177e-10, 0.4398599886584e+00, 0.6496374930224e+01,
6552           0.8562458214922e-10, 0.4772686794145e+01, 0.1194447056968e+01,
6553           0.8232525360654e-10, 0.5966220721679e+01, 0.1589072916335e+01,
6554           0.6150223411438e-10, 0.1780985591923e+01, 0.8827390247185e+01,
6555           0.6272087858000e-10, 0.3184305429012e+01, 0.8429241228195e+01,
6556 
6557           0.5540476311040e-10, 0.3801260595433e+01, 0.4933208510675e+01,
6558           0.7331901699361e-10, 0.5205948591865e+01, 0.4535059491685e+01,
6559           0.6018528702791e-10, 0.4770139083623e+01, 0.1255903824622e+02,
6560           0.5150530724804e-10, 0.3574796899585e+01, 0.1176985366291e+02,
6561           0.6471933741811e-10, 0.2679787266521e+01, 0.5088628793478e+01,
6562           0.5317460644174e-10, 0.9528763345494e+00, 0.3154687086868e+01,
6563           0.4832187748783e-10, 0.5329322498232e+01, 0.6040347114260e+01,
6564           0.4716763555110e-10, 0.2395235316466e+01, 0.5331357529664e+01,
6565           0.4871509139861e-10, 0.3056663648823e+01, 0.1256967486051e+02,
6566           0.4598417696768e-10, 0.4452762609019e+01, 0.6525804586632e+01,
6567 
6568           0.5674189533175e-10, 0.9879680872193e+00, 0.5729506548653e+01,
6569           0.4073560328195e-10, 0.5939127696986e+01, 0.7632943190217e+01,
6570           0.5040994945359e-10, 0.4549875824510e+01, 0.8031092209206e+01,
6571           0.5078185134679e-10, 0.7346659893982e+00, 0.7477522907414e+01,
6572           0.3769343537061e-10, 0.1071317188367e+01, 0.7234794171227e+01,
6573           0.4980331365299e-10, 0.2500345341784e+01, 0.6836645152238e+01,
6574           0.3458236594757e-10, 0.3825159450711e+01, 0.1097707878456e+02,
6575           0.3578859493602e-10, 0.5299664791549e+01, 0.4164311961999e+01,
6576           0.3370504646419e-10, 0.5002316301593e+01, 0.1137170464392e+02,
6577           0.3299873338428e-10, 0.2526123275282e+01, 0.3930209696940e+01,
6578 
6579           0.4304917318409e-10, 0.3368078557132e+01, 0.1592596075957e+01,
6580           0.3402418753455e-10, 0.8385495425800e+00, 0.3128388763578e+01,
6581           0.2778460572146e-10, 0.3669905203240e+01, 0.7342457794669e+01,
6582           0.2782710128902e-10, 0.2691664812170e+00, 0.1748016358760e+01,
6583           0.2711725179646e-10, 0.4707487217718e+01, 0.5296909721118e+00,
6584           0.2981760946340e-10, 0.3190260867816e+00, 0.5368044267797e+00,
6585           0.2811672977772e-10, 0.3196532315372e+01, 0.7084896783808e+01,
6586           0.2863454474467e-10, 0.2263240324780e+00, 0.5223693906222e+01,
6587           0.3333464634051e-10, 0.3498451685065e+01, 0.8018209333619e+00,
6588           0.3312991747609e-10, 0.5839154477412e+01, 0.1554202828031e+00,
6589 
6590           0.2813255564006e-10, 0.8268044346621e+00, 0.5225775174439e+00,
6591           0.2665098083966e-10, 0.3934021725360e+01, 0.5216580451554e+01,
6592           0.2349795705216e-10, 0.5197620913779e+01, 0.2146165377750e+01,
6593           0.2330352293961e-10, 0.2984999231807e+01, 0.1726015463500e+02,
6594           0.2728001683419e-10, 0.6521679638544e+00, 0.8635942003952e+01,
6595           0.2484061007669e-10, 0.3468955561097e+01, 0.5230807360890e+01,
6596           0.2646328768427e-10, 0.1013724533516e+01, 0.2629832328990e-01,
6597           0.2518630264831e-10, 0.6108081057122e+01, 0.5481254917084e+01,
6598           0.2421901455384e-10, 0.1651097776260e+01, 0.1349867339771e+01,
6599           0.6348533267831e-11, 0.3220226560321e+01, 0.8433466158131e+02 };
6600 
6601     /* Sun-to-Earth, T^1, Z */
6602       static final double e1z[] = {
6603           0.2278290449966e-05, 0.3413716033863e+01, 0.6283075850446e+01,
6604           0.5429458209830e-07, 0.0000000000000e+00, 0.0000000000000e+00,
6605           0.1903240492525e-07, 0.3370592358297e+01, 0.1256615170089e+02,
6606           0.2385409276743e-09, 0.3327914718416e+01, 0.1884922755134e+02,
6607           0.8676928342573e-10, 0.1824006811264e+01, 0.5223693906222e+01,
6608           0.7765442593544e-10, 0.3888564279247e+01, 0.5507553240374e+01,
6609           0.7066158332715e-10, 0.5194267231944e+01, 0.2352866153506e+01,
6610           0.7092175288657e-10, 0.2333246960021e+01, 0.8399684731857e+02,
6611           0.5357582213535e-10, 0.2224031176619e+01, 0.5296909721118e+00,
6612           0.3828035865021e-10, 0.2156710933584e+01, 0.6279552690824e+01,
6613 
6614           0.3824857220427e-10, 0.1529755219915e+01, 0.6286599010068e+01,
6615           0.3286995181628e-10, 0.4879512900483e+01, 0.1021328554739e+02 };
6616 
6617     /* Sun-to-Earth, T^2, X */
6618       static final double e2x[] = {
6619          -0.4143818297913e-10, 0.0000000000000e+00, 0.0000000000000e+00,
6620           0.2171497694435e-10, 0.4398225628264e+01, 0.1256615170089e+02,
6621           0.9845398442516e-11, 0.2079720838384e+00, 0.6283075850446e+01,
6622           0.9256833552682e-12, 0.4191264694361e+01, 0.1884922755134e+02,
6623           0.1022049384115e-12, 0.5381133195658e+01, 0.8399684731857e+02 };
6624 
6625     /* Sun-to-Earth, T^2, Y */
6626       static final double e2y[] = {
6627           0.5063375872532e-10, 0.0000000000000e+00, 0.0000000000000e+00,
6628           0.2173815785980e-10, 0.2827805833053e+01, 0.1256615170089e+02,
6629           0.1010231999920e-10, 0.4634612377133e+01, 0.6283075850446e+01,
6630           0.9259745317636e-12, 0.2620612076189e+01, 0.1884922755134e+02,
6631           0.1022202095812e-12, 0.3809562326066e+01, 0.8399684731857e+02 };
6632 
6633     /* Sun-to-Earth, T^2, Z */
6634       static final double e2z[] = {
6635           0.9722666114891e-10, 0.5152219582658e+01, 0.6283075850446e+01,
6636          -0.3494819171909e-11, 0.0000000000000e+00, 0.0000000000000e+00,
6637           0.6713034376076e-12, 0.6440188750495e+00, 0.1256615170089e+02 };
6638 
6639     }
6640       //subclassed the 
6641       private static class SSB {
6642     /* SSB-to-Sun, T^0, X */
6643       static final double s0x[] = {
6644           0.4956757536410e-02, 0.3741073751789e+01, 0.5296909721118e+00,
6645           0.2718490072522e-02, 0.4016011511425e+01, 0.2132990797783e+00,
6646           0.1546493974344e-02, 0.2170528330642e+01, 0.3813291813120e-01,
6647           0.8366855276341e-03, 0.2339614075294e+01, 0.7478166569050e-01,
6648           0.2936777942117e-03, 0.0000000000000e+00, 0.0000000000000e+00,
6649           0.1201317439469e-03, 0.4090736353305e+01, 0.1059381944224e+01,
6650           0.7578550887230e-04, 0.3241518088140e+01, 0.4265981595566e+00,
6651           0.1941787367773e-04, 0.1012202064330e+01, 0.2061856251104e+00,
6652           0.1889227765991e-04, 0.3892520416440e+01, 0.2204125344462e+00,
6653           0.1937896968613e-04, 0.4797779441161e+01, 0.1495633313810e+00,
6654 
6655           0.1434506110873e-04, 0.3868960697933e+01, 0.5225775174439e+00,
6656           0.1406659911580e-04, 0.4759766557397e+00, 0.5368044267797e+00,
6657           0.1179022300202e-04, 0.7774961520598e+00, 0.7626583626240e-01,
6658           0.8085864460959e-05, 0.3254654471465e+01, 0.3664874755930e-01,
6659           0.7622752967615e-05, 0.4227633103489e+01, 0.3961708870310e-01,
6660           0.6209171139066e-05, 0.2791828325711e+00, 0.7329749511860e-01,
6661           0.4366435633970e-05, 0.4440454875925e+01, 0.1589072916335e+01,
6662           0.3792124889348e-05, 0.5156393842356e+01, 0.7113454667900e-02,
6663           0.3154548963402e-05, 0.6157005730093e+01, 0.4194847048887e+00,
6664           0.3088359882942e-05, 0.2494567553163e+01, 0.6398972393349e+00,
6665 
6666           0.2788440902136e-05, 0.4934318747989e+01, 0.1102062672231e+00,
6667           0.3039928456376e-05, 0.4895077702640e+01, 0.6283075850446e+01,
6668           0.2272258457679e-05, 0.5278394064764e+01, 0.1030928125552e+00,
6669           0.2162007057957e-05, 0.5802978019099e+01, 0.3163918923335e+00,
6670           0.1767632855737e-05, 0.3415346595193e-01, 0.1021328554739e+02,
6671           0.1349413459362e-05, 0.2001643230755e+01, 0.1484170571900e-02,
6672           0.1170141900476e-05, 0.2424750491620e+01, 0.6327837846670e+00,
6673           0.1054355266820e-05, 0.3123311487576e+01, 0.4337116142245e+00,
6674           0.9800822461610e-06, 0.3026258088130e+01, 0.1052268489556e+01,
6675           0.1091203749931e-05, 0.3157811670347e+01, 0.1162474756779e+01,
6676 
6677           0.6960236715913e-06, 0.8219570542313e+00, 0.1066495398892e+01,
6678           0.5689257296909e-06, 0.1323052375236e+01, 0.9491756770005e+00,
6679           0.6613172135802e-06, 0.2765348881598e+00, 0.8460828644453e+00,
6680           0.6277702517571e-06, 0.5794064466382e+01, 0.1480791608091e+00,
6681           0.6304884066699e-06, 0.7323555380787e+00, 0.2243449970715e+00,
6682           0.4897850467382e-06, 0.3062464235399e+01, 0.3340612434717e+01,
6683           0.3759148598786e-06, 0.4588290469664e+01, 0.3516457698740e-01,
6684           0.3110520548195e-06, 0.1374299536572e+01, 0.6373574839730e-01,
6685           0.3064708359780e-06, 0.4222267485047e+01, 0.1104591729320e-01,
6686           0.2856347168241e-06, 0.3714202944973e+01, 0.1510475019529e+00,
6687 
6688           0.2840945514288e-06, 0.2847972875882e+01, 0.4110125927500e-01,
6689           0.2378951599405e-06, 0.3762072563388e+01, 0.2275259891141e+00,
6690           0.2714229481417e-06, 0.1036049980031e+01, 0.2535050500000e-01,
6691           0.2323551717307e-06, 0.4682388599076e+00, 0.8582758298370e-01,
6692           0.1881790512219e-06, 0.4790565425418e+01, 0.2118763888447e+01,
6693           0.2261353968371e-06, 0.1669144912212e+01, 0.7181332454670e-01,
6694           0.2214546389848e-06, 0.3937717281614e+01, 0.2968341143800e-02,
6695           0.2184915594933e-06, 0.1129169845099e+00, 0.7775000683430e-01,
6696           0.2000164937936e-06, 0.4030009638488e+01, 0.2093666171530e+00,
6697           0.1966105136719e-06, 0.8745955786834e+00, 0.2172315424036e+00,
6698 
6699           0.1904742332624e-06, 0.5919743598964e+01, 0.2022531624851e+00,
6700           0.1657399705031e-06, 0.2549141484884e+01, 0.7358765972222e+00,
6701           0.1574070533987e-06, 0.5277533020230e+01, 0.7429900518901e+00,
6702           0.1832261651039e-06, 0.3064688127777e+01, 0.3235053470014e+00,
6703           0.1733615346569e-06, 0.3011432799094e+01, 0.1385174140878e+00,
6704           0.1549124014496e-06, 0.4005569132359e+01, 0.5154640627760e+00,
6705           0.1637044713838e-06, 0.1831375966632e+01, 0.8531963191132e+00,
6706           0.1123420082383e-06, 0.1180270407578e+01, 0.1990721704425e+00,
6707           0.1083754165740e-06, 0.3414101320863e+00, 0.5439178814476e+00,
6708           0.1156638012655e-06, 0.6130479452594e+00, 0.5257585094865e+00,
6709 
6710           0.1142548785134e-06, 0.3724761948846e+01, 0.5336234347371e+00,
6711           0.7921463895965e-07, 0.2435425589361e+01, 0.1478866649112e+01,
6712           0.7428600285231e-07, 0.3542144398753e+01, 0.2164800718209e+00,
6713           0.8323211246747e-07, 0.3525058072354e+01, 0.1692165728891e+01,
6714           0.7257595116312e-07, 0.1364299431982e+01, 0.2101180877357e+00,
6715           0.7111185833236e-07, 0.2460478875808e+01, 0.4155522422634e+00,
6716           0.6868090383716e-07, 0.4397327670704e+01, 0.1173197218910e+00,
6717           0.7226419974175e-07, 0.4042647308905e+01, 0.1265567569334e+01,
6718           0.6955642383177e-07, 0.2865047906085e+01, 0.9562891316684e+00,
6719           0.7492139296331e-07, 0.5014278994215e+01, 0.1422690933580e-01,
6720 
6721           0.6598363128857e-07, 0.2376730020492e+01, 0.6470106940028e+00,
6722           0.7381147293385e-07, 0.3272990384244e+01, 0.1581959461667e+01,
6723           0.6402909624032e-07, 0.5302290955138e+01, 0.9597935788730e-01,
6724           0.6237454263857e-07, 0.5444144425332e+01, 0.7084920306520e-01,
6725           0.5241198544016e-07, 0.4215359579205e+01, 0.5265099800692e+00,
6726           0.5144463853918e-07, 0.1218916689916e+00, 0.5328719641544e+00,
6727           0.5868164772299e-07, 0.2369402002213e+01, 0.7871412831580e-01,
6728           0.6233195669151e-07, 0.1254922242403e+01, 0.2608790314060e+02,
6729           0.6068463791422e-07, 0.5679713760431e+01, 0.1114304132498e+00,
6730           0.4359361135065e-07, 0.6097219641646e+00, 0.1375773836557e+01,
6731 
6732           0.4686510366826e-07, 0.4786231041431e+01, 0.1143987543936e+00,
6733           0.3758977287225e-07, 0.1167368068139e+01, 0.1596186371003e+01,
6734           0.4282051974778e-07, 0.1519471064319e+01, 0.2770348281756e+00,
6735           0.5153765386113e-07, 0.1860532322984e+01, 0.2228608264996e+00,
6736           0.4575129387188e-07, 0.7632857887158e+00, 0.1465949902372e+00,
6737           0.3326844933286e-07, 0.1298219485285e+01, 0.5070101000000e-01,
6738           0.3748617450984e-07, 0.1046510321062e+01, 0.4903339079539e+00,
6739           0.2816756661499e-07, 0.3434522346190e+01, 0.2991266627620e+00,
6740           0.3412750405039e-07, 0.2523766270318e+01, 0.3518164938661e+00,
6741           0.2655796761776e-07, 0.2904422260194e+01, 0.6256703299991e+00,
6742 
6743           0.2963597929458e-07, 0.5923900431149e+00, 0.1099462426779e+00,
6744           0.2539523734781e-07, 0.4851947722567e+01, 0.1256615170089e+02,
6745           0.2283087914139e-07, 0.3400498595496e+01, 0.6681224869435e+01,
6746           0.2321309799331e-07, 0.5789099148673e+01, 0.3368040641550e-01,
6747           0.2549657649750e-07, 0.3991856479792e-01, 0.1169588211447e+01,
6748           0.2290462303977e-07, 0.2788567577052e+01, 0.1045155034888e+01,
6749           0.1945398522914e-07, 0.3290896998176e+01, 0.1155361302111e+01,
6750           0.1849171512638e-07, 0.2698060129367e+01, 0.4452511715700e-02,
6751           0.1647199834254e-07, 0.3016735644085e+01, 0.4408250688924e+00,
6752           0.1529530765273e-07, 0.5573043116178e+01, 0.6521991896920e-01,
6753 
6754           0.1433199339978e-07, 0.1481192356147e+01, 0.9420622223326e+00,
6755           0.1729134193602e-07, 0.1422817538933e+01, 0.2108507877249e+00,
6756           0.1716463931346e-07, 0.3469468901855e+01, 0.2157473718317e+00,
6757           0.1391206061378e-07, 0.6122436220547e+01, 0.4123712502208e+00,
6758           0.1404746661924e-07, 0.1647765641936e+01, 0.4258542984690e-01,
6759           0.1410452399455e-07, 0.5989729161964e+01, 0.2258291676434e+00,
6760           0.1089828772168e-07, 0.2833705509371e+01, 0.4226656969313e+00,
6761           0.1047374564948e-07, 0.5090690007331e+00, 0.3092784376656e+00,
6762           0.1358279126532e-07, 0.5128990262836e+01, 0.7923417740620e-01,
6763           0.1020456476148e-07, 0.9632772880808e+00, 0.1456308687557e+00,
6764 
6765           0.1033428735328e-07, 0.3223779318418e+01, 0.1795258541446e+01,
6766           0.1412435841540e-07, 0.2410271572721e+01, 0.1525316725248e+00,
6767           0.9722759371574e-08, 0.2333531395690e+01, 0.8434341241180e-01,
6768           0.9657334084704e-08, 0.6199270974168e+01, 0.1272681024002e+01,
6769           0.1083641148690e-07, 0.2864222292929e+01, 0.7032915397480e-01,
6770           0.1067318403838e-07, 0.5833458866568e+00, 0.2123349582968e+00,
6771           0.1062366201976e-07, 0.4307753989494e+01, 0.2142632012598e+00,
6772           0.1236364149266e-07, 0.2873917870593e+01, 0.1847279083684e+00,
6773           0.1092759489593e-07, 0.2959887266733e+01, 0.1370332435159e+00,
6774           0.8912069362899e-08, 0.5141213702562e+01, 0.2648454860559e+01,
6775 
6776           0.9656467707970e-08, 0.4532182462323e+01, 0.4376440768498e+00,
6777           0.8098386150135e-08, 0.2268906338379e+01, 0.2880807454688e+00,
6778           0.7857714675000e-08, 0.4055544260745e+01, 0.2037373330570e+00,
6779           0.7288455940646e-08, 0.5357901655142e+01, 0.1129145838217e+00,
6780           0.9450595950552e-08, 0.4264926963939e+01, 0.5272426800584e+00,
6781           0.9381718247537e-08, 0.7489366976576e-01, 0.5321392641652e+00,
6782           0.7079052646038e-08, 0.1923311052874e+01, 0.6288513220417e+00,
6783           0.9259004415344e-08, 0.2970256853438e+01, 0.1606092486742e+00,
6784           0.8259801499742e-08, 0.3327056314697e+01, 0.8389694097774e+00,
6785           0.6476334355779e-08, 0.2954925505727e+01, 0.2008557621224e+01,
6786 
6787           0.5984021492007e-08, 0.9138753105829e+00, 0.2042657109477e+02,
6788           0.5989546863181e-08, 0.3244464082031e+01, 0.2111650433779e+01,
6789           0.6233108606023e-08, 0.4995232638403e+00, 0.4305306221819e+00,
6790           0.6877299149965e-08, 0.2834987233449e+01, 0.9561746721300e-02,
6791           0.8311234227190e-08, 0.2202951835758e+01, 0.3801276407308e+00,
6792           0.6599472832414e-08, 0.4478581462618e+01, 0.1063314406849e+01,
6793           0.6160491096549e-08, 0.5145858696411e+01, 0.1368660381889e+01,
6794           0.6164772043891e-08, 0.3762976697911e+00, 0.4234171675140e+00,
6795           0.6363248684450e-08, 0.3162246718685e+01, 0.1253008786510e-01,
6796           0.6448587520999e-08, 0.3442693302119e+01, 0.5287268506303e+00,
6797 
6798           0.6431662283977e-08, 0.8977549136606e+00, 0.5306550935933e+00,
6799           0.6351223158474e-08, 0.4306447410369e+01, 0.5217580628120e+02,
6800           0.5476721393451e-08, 0.3888529177855e+01, 0.2221856701002e+01,
6801           0.5341772572619e-08, 0.2655560662512e+01, 0.7466759693650e-01,
6802           0.5337055758302e-08, 0.5164990735946e+01, 0.7489573444450e-01,
6803           0.5373120816787e-08, 0.6041214553456e+01, 0.1274714967946e+00,
6804           0.5392351705426e-08, 0.9177763485932e+00, 0.1055449481598e+01,
6805           0.6688495850205e-08, 0.3089608126937e+01, 0.2213766559277e+00,
6806           0.5072003660362e-08, 0.4311316541553e+01, 0.2132517061319e+00,
6807           0.5070726650455e-08, 0.5790675464444e+00, 0.2133464534247e+00,
6808 
6809           0.5658012950032e-08, 0.2703945510675e+01, 0.7287631425543e+00,
6810           0.4835509924854e-08, 0.2975422976065e+01, 0.7160067364790e-01,
6811           0.6479821978012e-08, 0.1324168733114e+01, 0.2209183458640e-01,
6812           0.6230636494980e-08, 0.2860103632836e+01, 0.3306188016693e+00,
6813           0.4649239516213e-08, 0.4832259763403e+01, 0.7796265773310e-01,
6814           0.6487325792700e-08, 0.2726165825042e+01, 0.3884652414254e+00,
6815           0.4682823682770e-08, 0.6966602455408e+00, 0.1073608853559e+01,
6816           0.5704230804976e-08, 0.5669634104606e+01, 0.8731175355560e-01,
6817           0.6125413585489e-08, 0.1513386538915e+01, 0.7605151500000e-01,
6818           0.6035825038187e-08, 0.1983509168227e+01, 0.9846002785331e+00,
6819 
6820           0.4331123462303e-08, 0.2782892992807e+01, 0.4297791515992e+00,
6821           0.4681107685143e-08, 0.5337232886836e+01, 0.2127790306879e+00,
6822           0.4669105829655e-08, 0.5837133792160e+01, 0.2138191288687e+00,
6823           0.5138823602365e-08, 0.3080560200507e+01, 0.7233337363710e-01,
6824           0.4615856664534e-08, 0.1661747897471e+01, 0.8603097737811e+00,
6825           0.4496916702197e-08, 0.2112508027068e+01, 0.7381754420900e-01,
6826           0.4278479042945e-08, 0.5716528462627e+01, 0.7574578717200e-01,
6827           0.3840525503932e-08, 0.6424172726492e+00, 0.3407705765729e+00,
6828           0.4866636509685e-08, 0.4919244697715e+01, 0.7722995774390e-01,
6829           0.3526100639296e-08, 0.2550821052734e+01, 0.6225157782540e-01,
6830 
6831           0.3939558488075e-08, 0.3939331491710e+01, 0.5268983110410e-01,
6832           0.4041268772576e-08, 0.2275337571218e+01, 0.3503323232942e+00,
6833           0.3948761842853e-08, 0.1999324200790e+01, 0.1451108196653e+00,
6834           0.3258394550029e-08, 0.9121001378200e+00, 0.5296435984654e+00,
6835           0.3257897048761e-08, 0.3428428660869e+01, 0.5297383457582e+00,
6836           0.3842559031298e-08, 0.6132927720035e+01, 0.9098186128426e+00,
6837           0.3109920095448e-08, 0.7693650193003e+00, 0.3932462625300e-02,
6838           0.3132237775119e-08, 0.3621293854908e+01, 0.2346394437820e+00,
6839           0.3942189421510e-08, 0.4841863659733e+01, 0.3180992042600e-02,
6840           0.3796972285340e-08, 0.1814174994268e+01, 0.1862120789403e+00,
6841 
6842           0.3995640233688e-08, 0.1386990406091e+01, 0.4549093064213e+00,
6843           0.2875013727414e-08, 0.9178318587177e+00, 0.1905464808669e+01,
6844           0.3073719932844e-08, 0.2688923811835e+01, 0.3628624111593e+00,
6845           0.2731016580075e-08, 0.1188259127584e+01, 0.2131850110243e+00,
6846           0.2729549896546e-08, 0.3702160634273e+01, 0.2134131485323e+00,
6847           0.3339372892449e-08, 0.7199163960331e+00, 0.2007689919132e+00,
6848           0.2898833764204e-08, 0.1916709364999e+01, 0.5291709230214e+00,
6849           0.2894536549362e-08, 0.2424043195547e+01, 0.5302110212022e+00,
6850           0.3096872473843e-08, 0.4445894977497e+01, 0.2976424921901e+00,
6851           0.2635672326810e-08, 0.3814366984117e+01, 0.1485980103780e+01,
6852 
6853           0.3649302697001e-08, 0.2924200596084e+01, 0.6044726378023e+00,
6854           0.3127954585895e-08, 0.1842251648327e+01, 0.1084620721060e+00,
6855           0.2616040173947e-08, 0.4155841921984e+01, 0.1258454114666e+01,
6856           0.2597395859860e-08, 0.1158045978874e+00, 0.2103781122809e+00,
6857           0.2593286172210e-08, 0.4771850408691e+01, 0.2162200472757e+00,
6858           0.2481823585747e-08, 0.4608842558889e+00, 0.1062562936266e+01,
6859           0.2742219550725e-08, 0.1538781127028e+01, 0.5651155736444e+00,
6860           0.3199558469610e-08, 0.3226647822878e+00, 0.7036329877322e+00,
6861           0.2666088542957e-08, 0.1967991731219e+00, 0.1400015846597e+00,
6862           0.2397067430580e-08, 0.3707036669873e+01, 0.2125476091956e+00,
6863 
6864           0.2376570772738e-08, 0.1182086628042e+01, 0.2140505503610e+00,
6865           0.2547228007887e-08, 0.4906256820629e+01, 0.1534957940063e+00,
6866           0.2265575594114e-08, 0.3414949866857e+01, 0.2235935264888e+00,
6867           0.2464381430585e-08, 0.4599122275378e+01, 0.2091065926078e+00,
6868           0.2433408527044e-08, 0.2830751145445e+00, 0.2174915669488e+00,
6869           0.2443605509076e-08, 0.4212046432538e+01, 0.1739420156204e+00,
6870           0.2319779262465e-08, 0.9881978408630e+00, 0.7530171478090e-01,
6871           0.2284622835465e-08, 0.5565347331588e+00, 0.7426161660010e-01,
6872           0.2467268750783e-08, 0.5655708150766e+00, 0.2526561439362e+00,
6873           0.2808513492782e-08, 0.1418405053408e+01, 0.5636314030725e+00,
6874 
6875           0.2329528932532e-08, 0.4069557545675e+01, 0.1056200952181e+01,
6876           0.9698639532817e-09, 0.1074134313634e+01, 0.7826370942180e+02 };
6877 
6878     /* SSB-to-Sun, T^0, Y */
6879       static final double s0y[] = {
6880           0.4955392320126e-02, 0.2170467313679e+01, 0.5296909721118e+00,
6881           0.2722325167392e-02, 0.2444433682196e+01, 0.2132990797783e+00,
6882           0.1546579925346e-02, 0.5992779281546e+00, 0.3813291813120e-01,
6883           0.8363140252966e-03, 0.7687356310801e+00, 0.7478166569050e-01,
6884           0.3385792683603e-03, 0.0000000000000e+00, 0.0000000000000e+00,
6885           0.1201192221613e-03, 0.2520035601514e+01, 0.1059381944224e+01,
6886           0.7587125720554e-04, 0.1669954006449e+01, 0.4265981595566e+00,
6887           0.1964155361250e-04, 0.5707743963343e+01, 0.2061856251104e+00,
6888           0.1891900364909e-04, 0.2320960679937e+01, 0.2204125344462e+00,
6889           0.1937373433356e-04, 0.3226940689555e+01, 0.1495633313810e+00,
6890 
6891           0.1437139941351e-04, 0.2301626908096e+01, 0.5225775174439e+00,
6892           0.1406267683099e-04, 0.5188579265542e+01, 0.5368044267797e+00,
6893           0.1178703080346e-04, 0.5489483248476e+01, 0.7626583626240e-01,
6894           0.8079835186041e-05, 0.1683751835264e+01, 0.3664874755930e-01,
6895           0.7623253594652e-05, 0.2656400462961e+01, 0.3961708870310e-01,
6896           0.6248667483971e-05, 0.4992775362055e+01, 0.7329749511860e-01,
6897           0.4366353695038e-05, 0.2869706279678e+01, 0.1589072916335e+01,
6898           0.3829101568895e-05, 0.3572131359950e+01, 0.7113454667900e-02,
6899           0.3175733773908e-05, 0.4535372530045e+01, 0.4194847048887e+00,
6900           0.3092437902159e-05, 0.9230153317909e+00, 0.6398972393349e+00,
6901 
6902           0.2874168812154e-05, 0.3363143761101e+01, 0.1102062672231e+00,
6903           0.3040119321826e-05, 0.3324250895675e+01, 0.6283075850446e+01,
6904           0.2699723308006e-05, 0.2917882441928e+00, 0.1030928125552e+00,
6905           0.2134832683534e-05, 0.4220997202487e+01, 0.3163918923335e+00,
6906           0.1770412139433e-05, 0.4747318496462e+01, 0.1021328554739e+02,
6907           0.1377264209373e-05, 0.4305058462401e+00, 0.1484170571900e-02,
6908           0.1127814538960e-05, 0.8538177240740e+00, 0.6327837846670e+00,
6909           0.1055608090130e-05, 0.1551800742580e+01, 0.4337116142245e+00,
6910           0.9802673861420e-06, 0.1459646735377e+01, 0.1052268489556e+01,
6911           0.1090329461951e-05, 0.1587351228711e+01, 0.1162474756779e+01,
6912 
6913           0.6959590025090e-06, 0.5534442628766e+01, 0.1066495398892e+01,
6914           0.5664914529542e-06, 0.6030673003297e+01, 0.9491756770005e+00,
6915           0.6607787763599e-06, 0.4989507233927e+01, 0.8460828644453e+00,
6916           0.6269725742838e-06, 0.4222951804572e+01, 0.1480791608091e+00,
6917           0.6301889697863e-06, 0.5444316669126e+01, 0.2243449970715e+00,
6918           0.4891042662861e-06, 0.1490552839784e+01, 0.3340612434717e+01,
6919           0.3457083123290e-06, 0.3030475486049e+01, 0.3516457698740e-01,
6920           0.3032559967314e-06, 0.2652038793632e+01, 0.1104591729320e-01,
6921           0.2841133988903e-06, 0.1276744786829e+01, 0.4110125927500e-01,
6922           0.2855564444432e-06, 0.2143368674733e+01, 0.1510475019529e+00,
6923 
6924           0.2765157135038e-06, 0.5444186109077e+01, 0.6373574839730e-01,
6925           0.2382312465034e-06, 0.2190521137593e+01, 0.2275259891141e+00,
6926           0.2808060365077e-06, 0.5735195064841e+01, 0.2535050500000e-01,
6927           0.2332175234405e-06, 0.9481985524859e-01, 0.7181332454670e-01,
6928           0.2322488199659e-06, 0.5180499361533e+01, 0.8582758298370e-01,
6929           0.1881850258423e-06, 0.3219788273885e+01, 0.2118763888447e+01,
6930           0.2196111392808e-06, 0.2366941159761e+01, 0.2968341143800e-02,
6931           0.2183810335519e-06, 0.4825445110915e+01, 0.7775000683430e-01,
6932           0.2002733093326e-06, 0.2457148995307e+01, 0.2093666171530e+00,
6933           0.1967111767229e-06, 0.5586291545459e+01, 0.2172315424036e+00,
6934 
6935           0.1568473250543e-06, 0.3708003123320e+01, 0.7429900518901e+00,
6936           0.1852528314300e-06, 0.4310638151560e+01, 0.2022531624851e+00,
6937           0.1832111226447e-06, 0.1494665322656e+01, 0.3235053470014e+00,
6938           0.1746805502310e-06, 0.1451378500784e+01, 0.1385174140878e+00,
6939           0.1555730966650e-06, 0.1068040418198e+01, 0.7358765972222e+00,
6940           0.1554883462559e-06, 0.2442579035461e+01, 0.5154640627760e+00,
6941           0.1638380568746e-06, 0.2597913420625e+00, 0.8531963191132e+00,
6942           0.1159938593640e-06, 0.5834512021280e+01, 0.1990721704425e+00,
6943           0.1083427965695e-06, 0.5054033177950e+01, 0.5439178814476e+00,
6944           0.1156480369431e-06, 0.5325677432457e+01, 0.5257585094865e+00,
6945 
6946           0.1141308860095e-06, 0.2153403923857e+01, 0.5336234347371e+00,
6947           0.7913146470946e-07, 0.8642846847027e+00, 0.1478866649112e+01,
6948           0.7439752463733e-07, 0.1970628496213e+01, 0.2164800718209e+00,
6949           0.7280277104079e-07, 0.6073307250609e+01, 0.2101180877357e+00,
6950           0.8319567719136e-07, 0.1954371928334e+01, 0.1692165728891e+01,
6951           0.7137705549290e-07, 0.8904989440909e+00, 0.4155522422634e+00,
6952           0.6900825396225e-07, 0.2825717714977e+01, 0.1173197218910e+00,
6953           0.7245757216635e-07, 0.2481677513331e+01, 0.1265567569334e+01,
6954           0.6961165696255e-07, 0.1292955312978e+01, 0.9562891316684e+00,
6955           0.7571804456890e-07, 0.3427517575069e+01, 0.1422690933580e-01,
6956 
6957           0.6605425721904e-07, 0.8052192701492e+00, 0.6470106940028e+00,
6958           0.7375477357248e-07, 0.1705076390088e+01, 0.1581959461667e+01,
6959           0.7041664951470e-07, 0.4848356967891e+00, 0.9597935788730e-01,
6960           0.6322199535763e-07, 0.3878069473909e+01, 0.7084920306520e-01,
6961           0.5244380279191e-07, 0.2645560544125e+01, 0.5265099800692e+00,
6962           0.5143125704988e-07, 0.4834486101370e+01, 0.5328719641544e+00,
6963           0.5871866319373e-07, 0.7981472548900e+00, 0.7871412831580e-01,
6964           0.6300822573871e-07, 0.5979398788281e+01, 0.2608790314060e+02,
6965           0.6062154271548e-07, 0.4108655402756e+01, 0.1114304132498e+00,
6966           0.4361912339976e-07, 0.5322624319280e+01, 0.1375773836557e+01,
6967 
6968           0.4417005920067e-07, 0.6240817359284e+01, 0.2770348281756e+00,
6969           0.4686806749936e-07, 0.3214977301156e+01, 0.1143987543936e+00,
6970           0.3758892132305e-07, 0.5879809634765e+01, 0.1596186371003e+01,
6971           0.5151351332319e-07, 0.2893377688007e+00, 0.2228608264996e+00,
6972           0.4554683578572e-07, 0.5475427144122e+01, 0.1465949902372e+00,
6973           0.3442381385338e-07, 0.5992034796640e+01, 0.5070101000000e-01,
6974           0.2831093954933e-07, 0.5367350273914e+01, 0.3092784376656e+00,
6975           0.3756267090084e-07, 0.5758171285420e+01, 0.4903339079539e+00,
6976           0.2816374679892e-07, 0.1863718700923e+01, 0.2991266627620e+00,
6977           0.3419307025569e-07, 0.9524347534130e+00, 0.3518164938661e+00,
6978 
6979           0.2904250494239e-07, 0.5304471615602e+01, 0.1099462426779e+00,
6980           0.2471734511206e-07, 0.1297069793530e+01, 0.6256703299991e+00,
6981           0.2539620831872e-07, 0.3281126083375e+01, 0.1256615170089e+02,
6982           0.2281017868007e-07, 0.1829122133165e+01, 0.6681224869435e+01,
6983           0.2275319473335e-07, 0.5797198160181e+01, 0.3932462625300e-02,
6984           0.2547755368442e-07, 0.4752697708330e+01, 0.1169588211447e+01,
6985           0.2285979669317e-07, 0.1223205292886e+01, 0.1045155034888e+01,
6986           0.1913386560994e-07, 0.1757532993389e+01, 0.1155361302111e+01,
6987           0.1809020525147e-07, 0.4246116108791e+01, 0.3368040641550e-01,
6988           0.1649213300201e-07, 0.1445162890627e+01, 0.4408250688924e+00,
6989 
6990           0.1834972793932e-07, 0.1126917567225e+01, 0.4452511715700e-02,
6991           0.1439550648138e-07, 0.6160756834764e+01, 0.9420622223326e+00,
6992           0.1487645457041e-07, 0.4358761931792e+01, 0.4123712502208e+00,
6993           0.1731729516660e-07, 0.6134456753344e+01, 0.2108507877249e+00,
6994           0.1717747163567e-07, 0.1898186084455e+01, 0.2157473718317e+00,
6995           0.1418190430374e-07, 0.4180286741266e+01, 0.6521991896920e-01,
6996           0.1404844134873e-07, 0.7654053565412e-01, 0.4258542984690e-01,
6997           0.1409842846538e-07, 0.4418612420312e+01, 0.2258291676434e+00,
6998           0.1090948346291e-07, 0.1260615686131e+01, 0.4226656969313e+00,
6999           0.1357577323612e-07, 0.3558248818690e+01, 0.7923417740620e-01,
7000 
7001           0.1018154061960e-07, 0.5676087241256e+01, 0.1456308687557e+00,
7002           0.1412073972109e-07, 0.8394392632422e+00, 0.1525316725248e+00,
7003           0.1030938326496e-07, 0.1653593274064e+01, 0.1795258541446e+01,
7004           0.1180081567104e-07, 0.1285802592036e+01, 0.7032915397480e-01,
7005           0.9708510575650e-08, 0.7631889488106e+00, 0.8434341241180e-01,
7006           0.9637689663447e-08, 0.4630642649176e+01, 0.1272681024002e+01,
7007           0.1068910429389e-07, 0.5294934032165e+01, 0.2123349582968e+00,
7008           0.1063716179336e-07, 0.2736266800832e+01, 0.2142632012598e+00,
7009           0.1234858713814e-07, 0.1302891146570e+01, 0.1847279083684e+00,
7010           0.8912631189738e-08, 0.3570415993621e+01, 0.2648454860559e+01,
7011 
7012           0.1036378285534e-07, 0.4236693440949e+01, 0.1370332435159e+00,
7013           0.9667798501561e-08, 0.2960768892398e+01, 0.4376440768498e+00,
7014           0.8108314201902e-08, 0.6987781646841e+00, 0.2880807454688e+00,
7015           0.7648364324628e-08, 0.2499017863863e+01, 0.2037373330570e+00,
7016           0.7286136828406e-08, 0.3787426951665e+01, 0.1129145838217e+00,
7017           0.9448237743913e-08, 0.2694354332983e+01, 0.5272426800584e+00,
7018           0.9374276106428e-08, 0.4787121277064e+01, 0.5321392641652e+00,
7019           0.7100226287462e-08, 0.3530238792101e+00, 0.6288513220417e+00,
7020           0.9253056659571e-08, 0.1399478925664e+01, 0.1606092486742e+00,
7021           0.6636432145504e-08, 0.3479575438447e+01, 0.1368660381889e+01,
7022 
7023           0.6469975312932e-08, 0.1383669964800e+01, 0.2008557621224e+01,
7024           0.7335849729765e-08, 0.1243698166898e+01, 0.9561746721300e-02,
7025           0.8743421205855e-08, 0.3776164289301e+01, 0.3801276407308e+00,
7026           0.5993635744494e-08, 0.5627122113596e+01, 0.2042657109477e+02,
7027           0.5981008479693e-08, 0.1674336636752e+01, 0.2111650433779e+01,
7028           0.6188535145838e-08, 0.5214925208672e+01, 0.4305306221819e+00,
7029           0.6596074017566e-08, 0.2907653268124e+01, 0.1063314406849e+01,
7030           0.6630815126226e-08, 0.2127643669658e+01, 0.8389694097774e+00,
7031           0.6156772830040e-08, 0.5082160803295e+01, 0.4234171675140e+00,
7032           0.6446960563014e-08, 0.1872100916905e+01, 0.5287268506303e+00,
7033 
7034           0.6429324424668e-08, 0.5610276103577e+01, 0.5306550935933e+00,
7035           0.6302232396465e-08, 0.1592152049607e+01, 0.1253008786510e-01,
7036           0.6399244436159e-08, 0.2746214421532e+01, 0.5217580628120e+02,
7037           0.5474965172558e-08, 0.2317666374383e+01, 0.2221856701002e+01,
7038           0.5339293190692e-08, 0.1084724961156e+01, 0.7466759693650e-01,
7039           0.5334733683389e-08, 0.3594106067745e+01, 0.7489573444450e-01,
7040           0.5392665782110e-08, 0.5630254365606e+01, 0.1055449481598e+01,
7041           0.6682075673789e-08, 0.1518480041732e+01, 0.2213766559277e+00,
7042           0.5079130495960e-08, 0.2739765115711e+01, 0.2132517061319e+00,
7043           0.5077759793261e-08, 0.5290711290094e+01, 0.2133464534247e+00,
7044 
7045           0.4832037368310e-08, 0.1404473217200e+01, 0.7160067364790e-01,
7046           0.6463279674802e-08, 0.6038381695210e+01, 0.2209183458640e-01,
7047           0.6240592771560e-08, 0.1290170653666e+01, 0.3306188016693e+00,
7048           0.4672013521493e-08, 0.3261895939677e+01, 0.7796265773310e-01,
7049           0.6500650750348e-08, 0.1154522312095e+01, 0.3884652414254e+00,
7050           0.6344161389053e-08, 0.6206111545062e+01, 0.7605151500000e-01,
7051           0.4682518370646e-08, 0.5409118796685e+01, 0.1073608853559e+01,
7052           0.5329460015591e-08, 0.1202985784864e+01, 0.7287631425543e+00,
7053           0.5701588675898e-08, 0.4098715257064e+01, 0.8731175355560e-01,
7054           0.6030690867211e-08, 0.4132033218460e+00, 0.9846002785331e+00,
7055 
7056           0.4336256312655e-08, 0.1211415991827e+01, 0.4297791515992e+00,
7057           0.4688498808975e-08, 0.3765479072409e+01, 0.2127790306879e+00,
7058           0.4675578609335e-08, 0.4265540037226e+01, 0.2138191288687e+00,
7059           0.4225578112158e-08, 0.5237566010676e+01, 0.3407705765729e+00,
7060           0.5139422230028e-08, 0.1507173079513e+01, 0.7233337363710e-01,
7061           0.4619995093571e-08, 0.9023957449848e-01, 0.8603097737811e+00,
7062           0.4494776255461e-08, 0.5414930552139e+00, 0.7381754420900e-01,
7063           0.4274026276788e-08, 0.4145735303659e+01, 0.7574578717200e-01,
7064           0.5018141789353e-08, 0.3344408829055e+01, 0.3180992042600e-02,
7065           0.4866163952181e-08, 0.3348534657607e+01, 0.7722995774390e-01,
7066 
7067           0.4111986020501e-08, 0.4198823597220e+00, 0.1451108196653e+00,
7068           0.3356142784950e-08, 0.5609144747180e+01, 0.1274714967946e+00,
7069           0.4070575554551e-08, 0.7028411059224e+00, 0.3503323232942e+00,
7070           0.3257451857278e-08, 0.5624697983086e+01, 0.5296435984654e+00,
7071           0.3256973703026e-08, 0.1857842076707e+01, 0.5297383457582e+00,
7072           0.3830771508640e-08, 0.4562887279931e+01, 0.9098186128426e+00,
7073           0.3725024005962e-08, 0.2358058692652e+00, 0.1084620721060e+00,
7074           0.3136763921756e-08, 0.2049731526845e+01, 0.2346394437820e+00,
7075           0.3795147256194e-08, 0.2432356296933e+00, 0.1862120789403e+00,
7076           0.2877342229911e-08, 0.5631101279387e+01, 0.1905464808669e+01,
7077 
7078           0.3076931798805e-08, 0.1117615737392e+01, 0.3628624111593e+00,
7079           0.2734765945273e-08, 0.5899826516955e+01, 0.2131850110243e+00,
7080           0.2733405296885e-08, 0.2130562964070e+01, 0.2134131485323e+00,
7081           0.2898552353410e-08, 0.3462387048225e+00, 0.5291709230214e+00,
7082           0.2893736103681e-08, 0.8534352781543e+00, 0.5302110212022e+00,
7083           0.3095717734137e-08, 0.2875061429041e+01, 0.2976424921901e+00,
7084           0.2636190425832e-08, 0.2242512846659e+01, 0.1485980103780e+01,
7085           0.3645512095537e-08, 0.1354016903958e+01, 0.6044726378023e+00,
7086           0.2808173547723e-08, 0.6705114365631e-01, 0.6225157782540e-01,
7087           0.2625012866888e-08, 0.4775705748482e+01, 0.5268983110410e-01,
7088 
7089           0.2572233995651e-08, 0.2638924216139e+01, 0.1258454114666e+01,
7090           0.2604238824792e-08, 0.4826358927373e+01, 0.2103781122809e+00,
7091           0.2596886385239e-08, 0.3200388483118e+01, 0.2162200472757e+00,
7092           0.3228057304264e-08, 0.5384848409563e+01, 0.2007689919132e+00,
7093           0.2481601798252e-08, 0.5173373487744e+01, 0.1062562936266e+01,
7094           0.2745977498864e-08, 0.6250966149853e+01, 0.5651155736444e+00,
7095           0.2669878833811e-08, 0.4906001352499e+01, 0.1400015846597e+00,
7096           0.3203986611711e-08, 0.5034333010005e+01, 0.7036329877322e+00,
7097           0.3354961227212e-08, 0.6108262423137e+01, 0.4549093064213e+00,
7098           0.2400407324558e-08, 0.2135399294955e+01, 0.2125476091956e+00,
7099 
7100           0.2379905859802e-08, 0.5893721933961e+01, 0.2140505503610e+00,
7101           0.2550844302187e-08, 0.3331940762063e+01, 0.1534957940063e+00,
7102           0.2268824211001e-08, 0.1843418461035e+01, 0.2235935264888e+00,
7103           0.2464700891204e-08, 0.3029548547230e+01, 0.2091065926078e+00,
7104           0.2436814726024e-08, 0.4994717970364e+01, 0.2174915669488e+00,
7105           0.2443623894745e-08, 0.2645102591375e+01, 0.1739420156204e+00,
7106           0.2318701783838e-08, 0.5700547397897e+01, 0.7530171478090e-01,
7107           0.2284448700256e-08, 0.5268898905872e+01, 0.7426161660010e-01,
7108           0.2468848123510e-08, 0.5276280575078e+01, 0.2526561439362e+00,
7109           0.2814052350303e-08, 0.6130168623475e+01, 0.5636314030725e+00,
7110 
7111           0.2243662755220e-08, 0.6631692457995e+00, 0.8886590321940e-01,
7112           0.2330795855941e-08, 0.2499435487702e+01, 0.1056200952181e+01,
7113           0.9757679038404e-09, 0.5796846023126e+01, 0.7826370942180e+02 };
7114 
7115     /* SSB-to-Sun, T^0, Z */
7116       static  final double s0z[] = {
7117           0.1181255122986e-03, 0.4607918989164e+00, 0.2132990797783e+00,
7118           0.1127777651095e-03, 0.4169146331296e+00, 0.5296909721118e+00,
7119           0.4777754401806e-04, 0.4582657007130e+01, 0.3813291813120e-01,
7120           0.1129354285772e-04, 0.5758735142480e+01, 0.7478166569050e-01,
7121          -0.1149543637123e-04, 0.0000000000000e+00, 0.0000000000000e+00,
7122           0.3298730512306e-05, 0.5978801994625e+01, 0.4265981595566e+00,
7123           0.2733376706079e-05, 0.7665413691040e+00, 0.1059381944224e+01,
7124           0.9426389657270e-06, 0.3710201265838e+01, 0.2061856251104e+00,
7125           0.8187517749552e-06, 0.3390675605802e+00, 0.2204125344462e+00,
7126           0.4080447871819e-06, 0.4552296640088e+00, 0.5225775174439e+00,
7127 
7128           0.3169973017028e-06, 0.3445455899321e+01, 0.5368044267797e+00,
7129           0.2438098615549e-06, 0.5664675150648e+01, 0.3664874755930e-01,
7130           0.2601897517235e-06, 0.1931894095697e+01, 0.1495633313810e+00,
7131           0.2314558080079e-06, 0.3666319115574e+00, 0.3961708870310e-01,
7132           0.1962549548002e-06, 0.3167411699020e+01, 0.7626583626240e-01,
7133           0.2180518287925e-06, 0.1544420746580e+01, 0.7113454667900e-02,
7134           0.1451382442868e-06, 0.1583756740070e+01, 0.1102062672231e+00,
7135           0.1358439007389e-06, 0.5239941758280e+01, 0.6398972393349e+00,
7136           0.1050585898028e-06, 0.2266958352859e+01, 0.3163918923335e+00,
7137           0.1050029870186e-06, 0.2711495250354e+01, 0.4194847048887e+00,
7138 
7139           0.9934920679800e-07, 0.1116208151396e+01, 0.1589072916335e+01,
7140           0.1048395331560e-06, 0.3408619600206e+01, 0.1021328554739e+02,
7141           0.8370147196668e-07, 0.3810459401087e+01, 0.2535050500000e-01,
7142           0.7989856510998e-07, 0.3769910473647e+01, 0.7329749511860e-01,
7143           0.5441221655233e-07, 0.2416994903374e+01, 0.1030928125552e+00,
7144           0.4610812906784e-07, 0.5858503336994e+01, 0.4337116142245e+00,
7145           0.3923022803444e-07, 0.3354170010125e+00, 0.1484170571900e-02,
7146           0.2610725582128e-07, 0.5410600646324e+01, 0.6327837846670e+00,
7147           0.2455279767721e-07, 0.6120216681403e+01, 0.1162474756779e+01,
7148           0.2375530706525e-07, 0.6055443426143e+01, 0.1052268489556e+01,
7149 
7150           0.1782967577553e-07, 0.3146108708004e+01, 0.8460828644453e+00,
7151           0.1581687095238e-07, 0.6255496089819e+00, 0.3340612434717e+01,
7152           0.1594657672461e-07, 0.3782604300261e+01, 0.1066495398892e+01,
7153           0.1563448615040e-07, 0.1997775733196e+01, 0.2022531624851e+00,
7154           0.1463624258525e-07, 0.1736316792088e+00, 0.3516457698740e-01,
7155           0.1331585056673e-07, 0.4331941830747e+01, 0.9491756770005e+00,
7156           0.1130634557637e-07, 0.6152017751825e+01, 0.2968341143800e-02,
7157           0.1028949607145e-07, 0.2101792614637e+00, 0.2275259891141e+00,
7158           0.1024074971618e-07, 0.4071833211074e+01, 0.5070101000000e-01,
7159           0.8826956060303e-08, 0.4861633688145e+00, 0.2093666171530e+00,
7160 
7161           0.8572230171541e-08, 0.5268190724302e+01, 0.4110125927500e-01,
7162           0.7649332643544e-08, 0.5134543417106e+01, 0.2608790314060e+02,
7163           0.8581673291033e-08, 0.2920218146681e+01, 0.1480791608091e+00,
7164           0.8430589300938e-08, 0.3604576619108e+01, 0.2172315424036e+00,
7165           0.7776165501012e-08, 0.3772942249792e+01, 0.6373574839730e-01,
7166           0.8311070234408e-08, 0.6200412329888e+01, 0.3235053470014e+00,
7167           0.6927365212582e-08, 0.4543353113437e+01, 0.8531963191132e+00,
7168           0.6791574208598e-08, 0.2882188406238e+01, 0.7181332454670e-01,
7169           0.5593100811839e-08, 0.1776646892780e+01, 0.7429900518901e+00,
7170           0.4553381853021e-08, 0.3949617611240e+01, 0.7775000683430e-01,
7171 
7172           0.5758000450068e-08, 0.3859251775075e+01, 0.1990721704425e+00,
7173           0.4281283457133e-08, 0.1466294631206e+01, 0.2118763888447e+01,
7174           0.4206935661097e-08, 0.5421776011706e+01, 0.1104591729320e-01,
7175           0.4213751641837e-08, 0.3412048993322e+01, 0.2243449970715e+00,
7176           0.5310506239878e-08, 0.5421641370995e+00, 0.5154640627760e+00,
7177           0.3827450341320e-08, 0.8887314524995e+00, 0.1510475019529e+00,
7178           0.4292435241187e-08, 0.1405043757194e+01, 0.1422690933580e-01,
7179           0.3189780702289e-08, 0.1060049293445e+01, 0.1173197218910e+00,
7180           0.3226611928069e-08, 0.6270858897442e+01, 0.2164800718209e+00,
7181           0.2893897608830e-08, 0.5117563223301e+01, 0.6470106940028e+00,
7182 
7183           0.3239852024578e-08, 0.4079092237983e+01, 0.2101180877357e+00,
7184           0.2956892222200e-08, 0.1594917021704e+01, 0.3092784376656e+00,
7185           0.2980177912437e-08, 0.5258787667564e+01, 0.4155522422634e+00,
7186           0.3163725690776e-08, 0.3854589225479e+01, 0.8582758298370e-01,
7187           0.2662262399118e-08, 0.3561326430187e+01, 0.5257585094865e+00,
7188           0.2766689135729e-08, 0.3180732086830e+00, 0.1385174140878e+00,
7189           0.2411600278464e-08, 0.3324798335058e+01, 0.5439178814476e+00,
7190           0.2483527695131e-08, 0.4169069291947e+00, 0.5336234347371e+00,
7191           0.7788777276590e-09, 0.1900569908215e+01, 0.5217580628120e+02 };
7192 
7193     /* SSB-to-Sun, T^1, X */
7194       static  final double s1x[] = {
7195          -0.1296310361520e-07, 0.0000000000000e+00, 0.0000000000000e+00,
7196           0.8975769009438e-08, 0.1128891609250e+01, 0.4265981595566e+00,
7197           0.7771113441307e-08, 0.2706039877077e+01, 0.2061856251104e+00,
7198           0.7538303866642e-08, 0.2191281289498e+01, 0.2204125344462e+00,
7199           0.6061384579336e-08, 0.3248167319958e+01, 0.1059381944224e+01,
7200           0.5726994235594e-08, 0.5569981398610e+01, 0.5225775174439e+00,
7201           0.5616492836424e-08, 0.5057386614909e+01, 0.5368044267797e+00,
7202           0.1010881584769e-08, 0.3473577116095e+01, 0.7113454667900e-02,
7203           0.7259606157626e-09, 0.3651858593665e+00, 0.6398972393349e+00,
7204           0.8755095026935e-09, 0.1662835408338e+01, 0.4194847048887e+00,
7205 
7206           0.5370491182812e-09, 0.1327673878077e+01, 0.4337116142245e+00,
7207           0.5743773887665e-09, 0.4250200846687e+01, 0.2132990797783e+00,
7208           0.4408103140300e-09, 0.3598752574277e+01, 0.1589072916335e+01,
7209           0.3101892374445e-09, 0.4887822983319e+01, 0.1052268489556e+01,
7210           0.3209453713578e-09, 0.9702272295114e+00, 0.5296909721118e+00,
7211           0.3017228286064e-09, 0.5484462275949e+01, 0.1066495398892e+01,
7212           0.3200700038601e-09, 0.2846613338643e+01, 0.1495633313810e+00,
7213           0.2137637279911e-09, 0.5692163292729e+00, 0.3163918923335e+00,
7214           0.1899686386727e-09, 0.2061077157189e+01, 0.2275259891141e+00,
7215           0.1401994545308e-09, 0.4177771136967e+01, 0.1102062672231e+00,
7216 
7217           0.1578057810499e-09, 0.5782460597335e+01, 0.7626583626240e-01,
7218           0.1237713253351e-09, 0.5705900866881e+01, 0.5154640627760e+00,
7219           0.1313076837395e-09, 0.5163438179576e+01, 0.3664874755930e-01,
7220           0.1184963304860e-09, 0.3054804427242e+01, 0.6327837846670e+00,
7221           0.1238130878565e-09, 0.2317292575962e+01, 0.3961708870310e-01,
7222           0.1015959527736e-09, 0.2194643645526e+01, 0.7329749511860e-01,
7223           0.9017954423714e-10, 0.2868603545435e+01, 0.1990721704425e+00,
7224           0.8668024955603e-10, 0.4923849675082e+01, 0.5439178814476e+00,
7225           0.7756083930103e-10, 0.3014334135200e+01, 0.9491756770005e+00,
7226           0.7536503401741e-10, 0.2704886279769e+01, 0.1030928125552e+00,
7227 
7228           0.5483308679332e-10, 0.6010983673799e+01, 0.8531963191132e+00,
7229           0.5184339620428e-10, 0.1952704573291e+01, 0.2093666171530e+00,
7230           0.5108658712030e-10, 0.2958575786649e+01, 0.2172315424036e+00,
7231           0.5019424524650e-10, 0.1736317621318e+01, 0.2164800718209e+00,
7232           0.4909312625978e-10, 0.3167216416257e+01, 0.2101180877357e+00,
7233           0.4456638901107e-10, 0.7697579923471e+00, 0.3235053470014e+00,
7234           0.4227030350925e-10, 0.3490910137928e+01, 0.6373574839730e-01,
7235           0.4095456040093e-10, 0.5178888984491e+00, 0.6470106940028e+00,
7236           0.4990537041422e-10, 0.3323887668974e+01, 0.1422690933580e-01,
7237           0.4321170010845e-10, 0.4288484987118e+01, 0.7358765972222e+00,
7238 
7239           0.3544072091802e-10, 0.6021051579251e+01, 0.5265099800692e+00,
7240           0.3480198638687e-10, 0.4600027054714e+01, 0.5328719641544e+00,
7241           0.3440287244435e-10, 0.4349525970742e+01, 0.8582758298370e-01,
7242           0.3330628322713e-10, 0.2347391505082e+01, 0.1104591729320e-01,
7243           0.2973060707184e-10, 0.4789409286400e+01, 0.5257585094865e+00,
7244           0.2932606766089e-10, 0.5831693799927e+01, 0.5336234347371e+00,
7245           0.2876972310953e-10, 0.2692638514771e+01, 0.1173197218910e+00,
7246           0.2827488278556e-10, 0.2056052487960e+01, 0.2022531624851e+00,
7247           0.2515028239756e-10, 0.7411863262449e+00, 0.9597935788730e-01,
7248           0.2853033744415e-10, 0.3948481024894e+01, 0.2118763888447e+01 };
7249 
7250     /* SSB-to-Sun, T^1, Y */
7251       static  final double s1y[] = {
7252           0.8989047573576e-08, 0.5840593672122e+01, 0.4265981595566e+00,
7253           0.7815938401048e-08, 0.1129664707133e+01, 0.2061856251104e+00,
7254           0.7550926713280e-08, 0.6196589104845e+00, 0.2204125344462e+00,
7255           0.6056556925895e-08, 0.1677494667846e+01, 0.1059381944224e+01,
7256           0.5734142698204e-08, 0.4000920852962e+01, 0.5225775174439e+00,
7257           0.5614341822459e-08, 0.3486722577328e+01, 0.5368044267797e+00,
7258           0.1028678147656e-08, 0.1877141024787e+01, 0.7113454667900e-02,
7259           0.7270792075266e-09, 0.5077167301739e+01, 0.6398972393349e+00,
7260           0.8734141726040e-09, 0.9069550282609e-01, 0.4194847048887e+00,
7261           0.5377371402113e-09, 0.6039381844671e+01, 0.4337116142245e+00,
7262 
7263           0.4729719431571e-09, 0.2153086311760e+01, 0.2132990797783e+00,
7264           0.4458052820973e-09, 0.5059830025565e+01, 0.5296909721118e+00,
7265           0.4406855467908e-09, 0.2027971692630e+01, 0.1589072916335e+01,
7266           0.3101659310977e-09, 0.3317677981860e+01, 0.1052268489556e+01,
7267           0.3016749232545e-09, 0.3913703482532e+01, 0.1066495398892e+01,
7268           0.3198541352656e-09, 0.1275513098525e+01, 0.1495633313810e+00,
7269           0.2142065389871e-09, 0.5301351614597e+01, 0.3163918923335e+00,
7270           0.1902615247592e-09, 0.4894943352736e+00, 0.2275259891141e+00,
7271           0.1613410990871e-09, 0.2449891130437e+01, 0.1102062672231e+00,
7272           0.1576992165097e-09, 0.4211421447633e+01, 0.7626583626240e-01,
7273 
7274           0.1241637259894e-09, 0.4140803368133e+01, 0.5154640627760e+00,
7275           0.1313974830355e-09, 0.3591920305503e+01, 0.3664874755930e-01,
7276           0.1181697118258e-09, 0.1506314382788e+01, 0.6327837846670e+00,
7277           0.1238239742779e-09, 0.7461405378404e+00, 0.3961708870310e-01,
7278           0.1010107068241e-09, 0.6271010795475e+00, 0.7329749511860e-01,
7279           0.9226316616509e-10, 0.1259158839583e+01, 0.1990721704425e+00,
7280           0.8664946419555e-10, 0.3353244696934e+01, 0.5439178814476e+00,
7281           0.7757230468978e-10, 0.1447677295196e+01, 0.9491756770005e+00,
7282           0.7693168628139e-10, 0.1120509896721e+01, 0.1030928125552e+00,
7283           0.5487897454612e-10, 0.4439380426795e+01, 0.8531963191132e+00,
7284 
7285           0.5196118677218e-10, 0.3788856619137e+00, 0.2093666171530e+00,
7286           0.5110853339935e-10, 0.1386879372016e+01, 0.2172315424036e+00,
7287           0.5027804534813e-10, 0.1647881805466e+00, 0.2164800718209e+00,
7288           0.4922485922674e-10, 0.1594315079862e+01, 0.2101180877357e+00,
7289           0.6155599524400e-10, 0.0000000000000e+00, 0.0000000000000e+00,
7290           0.4447147832161e-10, 0.5480720918976e+01, 0.3235053470014e+00,
7291           0.4144691276422e-10, 0.1931371033660e+01, 0.6373574839730e-01,
7292           0.4099950625452e-10, 0.5229611294335e+01, 0.6470106940028e+00,
7293           0.5060541682953e-10, 0.1731112486298e+01, 0.1422690933580e-01,
7294           0.4293615946300e-10, 0.2714571038925e+01, 0.7358765972222e+00,
7295 
7296           0.3545659845763e-10, 0.4451041444634e+01, 0.5265099800692e+00,
7297           0.3479112041196e-10, 0.3029385448081e+01, 0.5328719641544e+00,
7298           0.3438516493570e-10, 0.2778507143731e+01, 0.8582758298370e-01,
7299           0.3297341285033e-10, 0.7898709807584e+00, 0.1104591729320e-01,
7300           0.2972585818015e-10, 0.3218785316973e+01, 0.5257585094865e+00,
7301           0.2931707295017e-10, 0.4260731012098e+01, 0.5336234347371e+00,
7302           0.2897198149403e-10, 0.1120753978101e+01, 0.1173197218910e+00,
7303           0.2832293240878e-10, 0.4597682717827e+00, 0.2022531624851e+00,
7304           0.2864348326612e-10, 0.2169939928448e+01, 0.9597935788730e-01,
7305           0.2852714675471e-10, 0.2377659870578e+01, 0.2118763888447e+01 };
7306 
7307     /* SSB-to-Sun, T^1, Z */
7308       static final double s1z[] = {
7309           0.5444220475678e-08, 0.1803825509310e+01, 0.2132990797783e+00,
7310           0.3883412695596e-08, 0.4668616389392e+01, 0.5296909721118e+00,
7311           0.1334341434551e-08, 0.0000000000000e+00, 0.0000000000000e+00,
7312           0.3730001266883e-09, 0.5401405918943e+01, 0.2061856251104e+00,
7313           0.2894929197956e-09, 0.4932415609852e+01, 0.2204125344462e+00,
7314           0.2857950357701e-09, 0.3154625362131e+01, 0.7478166569050e-01,
7315           0.2499226432292e-09, 0.3657486128988e+01, 0.4265981595566e+00,
7316           0.1937705443593e-09, 0.5740434679002e+01, 0.1059381944224e+01,
7317           0.1374894396320e-09, 0.1712857366891e+01, 0.5368044267797e+00,
7318           0.1217248678408e-09, 0.2312090870932e+01, 0.5225775174439e+00,
7319 
7320           0.7961052740870e-10, 0.5283368554163e+01, 0.3813291813120e-01,
7321           0.4979225949689e-10, 0.4298290471860e+01, 0.4194847048887e+00,
7322           0.4388552286597e-10, 0.6145515047406e+01, 0.7113454667900e-02,
7323           0.2586835212560e-10, 0.3019448001809e+01, 0.6398972393349e+00 };
7324 
7325     /* SSB-to-Sun, T^2, X */
7326       static  final double s2x[] = {
7327           0.1603551636587e-11, 0.4404109410481e+01, 0.2061856251104e+00,
7328           0.1556935889384e-11, 0.4818040873603e+00, 0.2204125344462e+00,
7329           0.1182594414915e-11, 0.9935762734472e+00, 0.5225775174439e+00,
7330           0.1158794583180e-11, 0.3353180966450e+01, 0.5368044267797e+00,
7331           0.9597358943932e-12, 0.5567045358298e+01, 0.2132990797783e+00,
7332           0.6511516579605e-12, 0.5630872420788e+01, 0.4265981595566e+00,
7333           0.7419792747688e-12, 0.2156188581957e+01, 0.5296909721118e+00,
7334           0.3951972655848e-12, 0.1981022541805e+01, 0.1059381944224e+01,
7335           0.4478223877045e-12, 0.0000000000000e+00, 0.0000000000000e+00 };
7336 
7337     /* SSB-to-Sun, T^2, Y */
7338       static final double s2y[] = {
7339           0.1609114495091e-11, 0.2831096993481e+01, 0.2061856251104e+00,
7340           0.1560330784946e-11, 0.5193058213906e+01, 0.2204125344462e+00,
7341           0.1183535479202e-11, 0.5707003443890e+01, 0.5225775174439e+00,
7342           0.1158183066182e-11, 0.1782400404928e+01, 0.5368044267797e+00,
7343           0.1032868027407e-11, 0.4036925452011e+01, 0.2132990797783e+00,
7344           0.6540142847741e-12, 0.4058241056717e+01, 0.4265981595566e+00,
7345           0.7305236491596e-12, 0.6175401942957e+00, 0.5296909721118e+00,
7346          -0.5580725052968e-12, 0.0000000000000e+00, 0.0000000000000e+00,
7347           0.3946122651015e-12, 0.4108265279171e+00, 0.1059381944224e+01 };
7348 
7349     /* SSB-to-Sun, T^2, Z */
7350       static final double s2z[] = {
7351           0.3749920358054e-12, 0.3230285558668e+01, 0.2132990797783e+00,
7352           0.2735037220939e-12, 0.6154322683046e+01, 0.5296909721118e+00 };
7353         }
7354       
7355         /**
7356          *  Earth position and velocity, heliocentric and barycentric, with
7357          *  respect to the Barycentric Celestial Reference System.
7358          *
7359          *<p>This function is derived from the International Astronomical Union's
7360          *  SOFA (Standards Of Fundamental Astronomy) software collection.
7361          *
7362          *<p>Status:  support function.
7363          *
7364          *<!-- Given: -->
7365          *     @param date1 double         TDB date (Note 1)
7366          *     @param date2 double         TDB date (Note 1) 
7367          *
7368          *<!-- Returned: -->
7369          *     @param pvh           double[2][3]    <u>returned</u> heliocentric Earth position/velocity (AU, AU/d)
7370          *     @param pvb           double[2][3]    <u>returned</u> barycentric Earth position/velocity (AU, AU/d)
7371          *
7372          * <!-- Returned (function value): -->
7373          *  @return int           status: 0 = OK
7374          *                                       +1 = warning: date outside
7375          *                                            the range 1900-2100 AD
7376          *
7377          * <p>Notes:
7378          * <ol>
7379          *
7380          * <li> The TDB date date1+date2 is a Julian Date, apportioned in any
7381          *     convenient way between the two arguments.  For example,
7382          *     JD(TDB)=2450123.7 could be expressed in any of these ways, among
7383          *     others:
7384          *<pre>
7385          *            date1          date2
7386          *
7387          *         2450123.7           0.0       (JD method)
7388          *         2451545.0       -1421.3       (J2000 method)
7389          *         2400000.5       50123.2       (MJD method)
7390          *         2450123.5           0.2       (date &amp; time method)
7391          *</pre>
7392          *     The JD method is the most natural and convenient to use in cases
7393          *     where the loss of several decimal digits of resolution is
7394          *     acceptable.  The J2000 method is best matched to the way the
7395          *     argument is handled internally and will deliver the optimum
7396          *     resolution.  The MJD method and the date &amp; time methods are both
7397          *     good compromises between resolution and convenience.  However,
7398          *     the accuracy of the result is more likely to be limited by the
7399          *     algorithm itself than the way the date has been expressed.
7400          *
7401          *     n.b. TT can be used instead of TDB in most applications.
7402          *
7403          * <li> On return, the arrays pvh and pvb contain the following:
7404          *
7405          *        pvh[0][0]  x       }
7406          *        pvh[0][1]  y       } heliocentric position, AU
7407          *        pvh[0][2]  z       }
7408          *
7409          *        pvh[1][0]  xdot    }
7410          *        pvh[1][1]  ydot    } heliocentric velocity, AU/d
7411          *        pvh[1][2]  zdot    }
7412          *
7413          *        pvb[0][0]  x       }
7414          *        pvb[0][1]  y       } barycentric position, AU
7415          *        pvb[0][2]  z       }
7416          *
7417          *        pvb[1][0]  xdot    }
7418          *        pvb[1][1]  ydot    } barycentric velocity, AU/d
7419          *        pvb[1][2]  zdot    }
7420          *
7421          *     The vectors are with respect to the Barycentric Celestial
7422          *     Reference System.  The time unit is one day in TDB.
7423          *
7424          * <li> The function is a SIMPLIFIED SOLUTION from the planetary theory
7425          *     VSOP2000 (X. Moisson, P. Bretagnon, 2001, Celes. Mechanics &amp;
7426          *     Dyn. Astron., 80, 3/4, 205-213) and is an adaptation of original
7427          *     Fortran code supplied by P. Bretagnon (private comm., 2000).
7428          *
7429          * <li> Comparisons over the time span 1900-2100 with this simplified
7430          *     solution and the JPL DE405 ephemeris give the following results:
7431          *
7432          *                                RMS    max
7433          *           Heliocentric:
7434          *              position error    3.7   11.2   km
7435          *              velocity error    1.4    5.0   mm/s
7436          *
7437          *           Barycentric:
7438          *              position error    4.6   13.4   km
7439          *              velocity error    1.4    4.9   mm/s
7440          *
7441          *     Comparisons with the JPL DE406 ephemeris show that by 1800 and
7442          *     2200 the position errors are approximately double their 1900-2100
7443          *     size.  By 1500 and 2500 the deterioration is a factor of 10 and
7444          *     by 1000 and 3000 a factor of 60.  The velocity accuracy falls off
7445          *     at about half that rate.
7446          *
7447          * <li> It is permissible to use the same array for pvh and pvb, which
7448          *     will receive the barycentric values.
7449          *</ol>
7450          *@version 2008 November 18
7451          *
7452          *  @since Release 20101201
7453          *
7454          *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
7455          */
7456          public static int jauEpv00(final double date1, final double date2,
7457                       double pvh[][], double pvb[][])
7458          {
7459          /*
7460          * Matrix elements for orienting the analytical model to DE405.
7461          *
7462          * The corresponding Euler angles are:
7463          *
7464          *                       d  '  "
7465          *   1st rotation    -  23 26 21.4091 about the x-axis  (obliquity)
7466          *   2nd rotation    +         0.0475 about the z-axis  (RA offset)
7467          *
7468          * These were obtained empirically, by comparisons with DE405 over
7469          * 1900-2100.
7470          */
7471             final double am12 =  0.000000211284,
7472                                 am13 = -0.000000091603,
7473                                 am21 = -0.000000230286,
7474                                 am22 =  0.917482137087,
7475                                 am23 = -0.397776982902,
7476                                 am32 =  0.397776982902,
7477                                 am33 =  0.917482137087;
7478             
7479       
7480         
7481         
7482     /* Pointers to coefficient arrays, in x,y,z sets */
7483        final double ce0[][] = { Ephemeris.e0x, Ephemeris.e0y, Ephemeris.e0z },
7484                            ce1[][] = { Ephemeris.e1x, Ephemeris.e1y, Ephemeris.e1z },
7485                            ce2[][] = { Ephemeris.e2x, Ephemeris.e2y, Ephemeris.e2z },
7486                            cs0[][] = { Ephemeris.s0x, Ephemeris.s0y, Ephemeris.s0z },
7487                            cs1[][] = { Ephemeris.s1x, Ephemeris.s1y, Ephemeris.s1z },
7488                            cs2[][] = { Ephemeris.s2x, Ephemeris.s2y, Ephemeris.s2z };
7489        /* Numbers of terms for each component of the model, in x,y,z sets */
7490        final int ne0[] = {Ephemeris.e0x.length/3,
7491                Ephemeris.e0y.length/3,
7492                Ephemeris.e0z.length/3 },
7493                         ne1[] = {Ephemeris.e1x.length/3,
7494                Ephemeris.e1y.length/3,
7495                Ephemeris.e1z.length/3 },
7496                         ne2[] = {Ephemeris.e2x.length/3,
7497                Ephemeris.e2y.length/3,
7498                Ephemeris.e2z.length/3 },
7499                         ns0[] = {Ephemeris.s0x.length/3,
7500                Ephemeris.s0y.length/3,
7501                Ephemeris.s0z.length/3 },
7502                         ns1[] = {Ephemeris.s1x.length/3,
7503                Ephemeris.s1y.length/3,
7504                Ephemeris.s1z.length/3 },
7505                         ns2[] = {Ephemeris.s2x.length/3,
7506                Ephemeris.s2y.length/3,
7507                Ephemeris.s2z.length/3 };
7508        int nterms;
7509 
7510     /* Miscellaneous */
7511        int jstat, i, j;
7512        double t, t2, xyz, xyzd, a, b, c, ct, p, cp,
7513               ph[] = new double[3], vh[] = new double[3], pb[] = new double[3], vb[] = new double[3], x, y, z;
7514 
7515     /*--------------------------------------------------------------------*/
7516 
7517     /* Time since reference epoch, Julian years. */
7518        t = ((date1 - DJ00) + date2) / DJY;
7519        t2 = t*t;
7520 
7521     /* Set status. */
7522        jstat = abs(t) <= 100.0 ? 0 : 1;
7523 
7524     /* X then Y then Z. */
7525        for (i = 0; i < 3; i++) {
7526 
7527        /* Initialize position and velocity component. */
7528           xyz = 0.0;
7529           xyzd = 0.0;
7530 
7531        /* ------------------------------------------------ */
7532        /* Obtain component of Sun to Earth ecliptic vector */
7533        /* ------------------------------------------------ */
7534 
7535        /* Sun to Earth, T^0 terms. */
7536           nterms = ne0[i];
7537           int idx;
7538           for (j = 0, idx=0; j < nterms; j++) {
7539              a = ce0[i][idx++];
7540              b = ce0[i][idx++];
7541              c = ce0[i][idx++];
7542              p = b + c*t;
7543              xyz  += a*cos(p);
7544              xyzd -= a*c*sin(p);
7545           }
7546 
7547        /* Sun to Earth, T^1 terms. */
7548           nterms = ne1[i];
7549           for (j = 0, idx= 0; j < nterms; j++) {
7550              a = ce1[i][idx++];
7551              b = ce1[i][idx++];
7552              c = ce1[i][idx++];
7553              ct = c*t;
7554              p = b + ct;
7555              cp = cos(p);
7556              xyz  += a*t*cp;
7557              xyzd += a*( cp - ct*sin(p) );
7558           }
7559 
7560        /* Sun to Earth, T^2 terms. */
7561           nterms = ne2[i];
7562           for (j = 0, idx = 0; j < nterms; j++) {
7563              a = ce2[i][idx++];
7564              b = ce2[i][idx++];
7565              c = ce2[i][idx++];
7566              ct = c*t;
7567              p = b + ct;
7568              cp = cos(p);
7569              xyz  += a*t2*cp;
7570              xyzd += a*t*( 2.0*cp - ct*sin(p) );
7571           }
7572 
7573        /* Heliocentric Earth position and velocity component. */
7574           ph[i] = xyz;
7575           vh[i] = xyzd / DJY;
7576 
7577        /* ------------------------------------------------ */
7578        /* Obtain component of SSB to Earth ecliptic vector */
7579        /* ------------------------------------------------ */
7580 
7581        /* SSB to Sun, T^0 terms. */
7582           nterms = ns0[i];
7583           for (j = 0, idx = 0; j < nterms; j++) {
7584              a = cs0[i][idx++];
7585              b = cs0[i][idx++];
7586              c = cs0[i][idx++];
7587              p = b + c*t;
7588              xyz  += a*cos(p);
7589              xyzd -= a*c*sin(p);
7590           }
7591 
7592        /* SSB to Sun, T^1 terms. */
7593           nterms = ns1[i];
7594           for (j = 0, idx = 0; j < nterms; j++) {
7595              a = cs1[i][idx++];
7596              b = cs1[i][idx++];
7597              c = cs1[i][idx++];
7598              ct = c*t;
7599              p = b + ct;
7600              cp = cos(p);
7601              xyz  += a*t*cp;
7602              xyzd += a*(cp - ct*sin(p));
7603           }
7604 
7605        /* SSB to Sun, T^2 terms. */
7606           nterms = ns2[i];
7607           for (j = 0, idx = 0; j < nterms; j++) {
7608              a = cs2[i][idx++];
7609              b = cs2[i][idx++];
7610              c = cs2[i][idx++];
7611              ct = c*t;
7612              p = b + ct;
7613              cp = cos(p);
7614              xyz  += a*t2*cp;
7615              xyzd += a*t*(2.0*cp - ct*sin(p));
7616          }
7617 
7618        /* Barycentric Earth position and velocity component. */
7619          pb[i] = xyz;
7620          vb[i] = xyzd / DJY;
7621 
7622        /* Next Cartesian component. */
7623        }
7624 
7625     /* Rotate from ecliptic to BCRS coordinates. */
7626 
7627        x = ph[0];
7628        y = ph[1];
7629        z = ph[2];
7630        pvh[0][0] =      x + am12*y + am13*z;
7631        pvh[0][1] = am21*x + am22*y + am23*z;
7632        pvh[0][2] =          am32*y + am33*z;
7633 
7634        x = vh[0];
7635        y = vh[1];
7636        z = vh[2];
7637        pvh[1][0] =      x + am12*y + am13*z;
7638        pvh[1][1] = am21*x + am22*y + am23*z;
7639        pvh[1][2] =          am32*y + am33*z;
7640 
7641        x = pb[0];
7642        y = pb[1];
7643        z = pb[2];
7644        pvb[0][0] =      x + am12*y + am13*z;
7645        pvb[0][1] = am21*x + am22*y + am23*z;
7646        pvb[0][2] =          am32*y + am33*z;
7647 
7648        x = vb[0];
7649        y = vb[1];
7650        z = vb[2];
7651        pvb[1][0] =      x + am12*y + am13*z;
7652        pvb[1][1] = am21*x + am22*y + am23*z;
7653        pvb[1][2] =          am32*y + am33*z;
7654 
7655     /* Return the status. */
7656        return jstat;
7657 
7658         }
7659     
7660 
7661     /**
7662     *  Equation of the equinoxes, IAU 1994 model.
7663     *
7664     *<p>This function is derived from the International Astronomical Union's
7665     *  SOFA (Standards Of Fundamental Astronomy) software collection.
7666     *
7667     *<p>Status:  canonical model.
7668     *
7669     *<!-- Given: -->
7670     *     @param date1 double      TDB date (Note 1)
7671     *     @param date2 double      TDB date (Note 1) 
7672     *
7673     * <!-- Returned (function value): -->
7674     *  @return double     equation of the equinoxes (Note 2)
7675     *
7676     * <p>Notes:
7677     * <ol>
7678     *
7679     * <li> The date date1+date2 is a Julian Date, apportioned in any
7680     *     convenient way between the two arguments.  For example,
7681     *     JD(TT)=2450123.7 could be expressed in any of these ways,
7682     *     among others:
7683     *<pre>
7684     *            date1          date2
7685     *
7686     *         2450123.7           0.0       (JD method)
7687     *         2451545.0       -1421.3       (J2000 method)
7688     *         2400000.5       50123.2       (MJD method)
7689     *         2450123.5           0.2       (date &amp; time method)
7690     *</pre>
7691     *     The JD method is the most natural and convenient to use in
7692     *     cases where the loss of several decimal digits of resolution
7693     *     is acceptable.  The J2000 method is best matched to the way
7694     *     the argument is handled internally and will deliver the
7695     *     optimum resolution.  The MJD method and the date &amp; time methods
7696     *     are both good compromises between resolution and convenience.
7697     *
7698     * <li> The result, which is in radians, operates in the following sense:
7699     *
7700     *        Greenwich apparent ST = GMST + equation of the equinoxes
7701     *</ol>
7702     *<p>Called:<ul>
7703     *     <li>{@link #jauNut80} nutation, IAU 1980
7704     *     <li>{@link #jauObl80} mean obliquity, IAU 1980
7705     * </ul>
7706     *<p>References:
7707     *
7708     *     <p>IAU Resolution C7, Recommendation 3 (1994).
7709     *
7710     *     <p>Capitaine, N. &amp; Gontier, A.-M., 1993, Astron. Astrophys., 275,
7711     *     645-650.
7712     *
7713     *@version 2008 May 24
7714     *
7715     *  @since Release 20101201
7716     *
7717     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
7718     */
7719     public static double jauEqeq94(double date1, double date2)
7720     {
7721        double t,  om,  eps0, ee;
7722 
7723 
7724     /* Interval between fundamental epoch J2000.0 and given date (JC). */
7725        t = ((date1 - DJ00) + date2) / DJC;
7726 
7727     /* Longitude of the mean ascending node of the lunar orbit on the */
7728     /* ecliptic, measured from the mean equinox of date. */
7729        om = jauAnpm((450160.280 + (-482890.539
7730                + (7.455 + 0.008 * t) * t) * t) * DAS2R
7731                + fmod(-5.0 * t, 1.0) * D2PI);
7732 
7733     /* Nutation components and mean obliquity. */
7734        NutationTerms nt = jauNut80(date1, date2);
7735        eps0 = jauObl80(date1, date2);
7736 
7737     /* Equation of the equinoxes. */
7738        ee = nt.dpsi*cos(eps0) + DAS2R*(0.00264*sin(om) + 0.000063*sin(om+om));
7739 
7740        return ee;
7741 
7742         }
7743     
7744 
7745     /**
7746     *  Earth rotation angle (IAU 2000 model).
7747     *
7748     *<p>This function is derived from the International Astronomical Union's
7749     *  SOFA (Standards Of Fundamental Astronomy) software collection.
7750     *
7751     *<p>Status:  canonical model.
7752     *
7753     *<!-- Given: -->
7754     *     @param dj1 double     UT1 as a 2-part Julian Date (see note)
7755     *     @param dj2 double     UT1 as a 2-part Julian Date (see note) 
7756     *
7757     * <!-- Returned (function value): -->
7758     *  @return double    Earth rotation angle (radians), range 0-2pi
7759     *
7760     * <p>Notes:
7761     * <ol>
7762     *
7763     * <li> The UT1 date dj1+dj2 is a Julian Date, apportioned in any
7764     *     convenient way between the arguments dj1 and dj2.  For example,
7765     *     JD(UT1)=2450123.7 could be expressed in any of these ways,
7766     *     among others:
7767     *<pre>
7768     *             dj1            dj2
7769     *
7770     *         2450123.7           0.0       (JD method)
7771     *         2451545.0       -1421.3       (J2000 method)
7772     *         2400000.5       50123.2       (MJD method)
7773     *         2450123.5           0.2       (date &amp; time method)
7774     *</pre>
7775     *     The JD method is the most natural and convenient to use in
7776     *     cases where the loss of several decimal digits of resolution
7777     *     is acceptable.  The J2000 and MJD methods are good compromises
7778     *     between resolution and convenience.  The date &amp; time method is
7779     *     best matched to the algorithm used:  maximum precision is
7780     *     delivered when the dj1 argument is for 0hrs UT1 on the day in
7781     *     question and the dj2 argument lies in the range 0 to 1, or vice
7782     *     versa.
7783     *
7784     * <li> The algorithm is adapted from Expression 22 of Capitaine et al.
7785     *     2000.  The time argument has been expressed in days directly,
7786     *     and, to retain precision, integer contributions have been
7787     *     eliminated.  The same formulation is given in IERS Conventions
7788     *     (2003), Chap. 5, Eq. 14.
7789     *</ol>
7790     *<p>Called:<ul>
7791     *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
7792     * </ul>
7793     *<p>References:
7794     *
7795     *     <p>Capitaine N., Guinot B. and McCarthy D.D, 2000, Astron.
7796     *     Astrophys., 355, 398-405.
7797     *
7798     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
7799     *     IERS Technical Note No. 32, BKG (2004)
7800     *
7801     *@version 2008 May 24
7802     *
7803     *  @since Release 20101201
7804     *
7805     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
7806     */
7807     public static double jauEra00(double dj1, double dj2)
7808     {
7809        double d1, d2, t, f, theta;
7810 
7811 
7812     /* Days since fundamental epoch. */
7813        if (dj1 < dj2) {
7814           d1 = dj1;
7815           d2 = dj2;
7816        } else {
7817           d1 = dj2;
7818           d2 = dj1;
7819        }
7820        t = d1 + (d2- DJ00);
7821 
7822     /* Fractional part of T (days). */
7823        f = fmod(d1, 1.0) + fmod(d2, 1.0);
7824 
7825     /* Earth rotation angle at this UT1. */
7826        theta = jauAnp(D2PI * (f + 0.7790572732640
7827                                 + 0.00273781191135448 * t));
7828 
7829        return theta;
7830 
7831         }
7832     
7833 
7834     /**
7835     *  Fundamental argument, IERS Conventions (2003):
7836     *  mean elongation of the Moon from the Sun.
7837     *
7838     *<p>This function is derived from the International Astronomical Union's
7839     *  SOFA (Standards Of Fundamental Astronomy) software collection.
7840     *
7841     *<p>Status:  canonical model.
7842     *
7843     *<!-- Given: -->
7844     *     @param t      double     TDB, Julian centuries since J2000.0 (Note 1)
7845     *
7846     * <!-- Returned (function value): -->
7847     *  @return double    D, radians (Note 2)
7848     *
7849     * <p>Notes:
7850     * <ol>
7851     *
7852     * <li> Though t is strictly TDB, it is usually more convenient to use
7853     *     TT, which makes no significant difference.
7854     *
7855     * <li> The expression used is as adopted in IERS Conventions (2003) and
7856     *     is from Simon et al. (1994).
7857     *</ol>
7858     *<p>References:
7859     *
7860     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
7861     *     IERS Technical Note No. 32, BKG (2004)
7862     *
7863     *     <p>Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
7864     *     Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
7865     *
7866     *@version 2009 December 16
7867     *
7868     *  @since Release 20101201
7869     *
7870     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
7871     */
7872     public static double jauFad03(double t)
7873     {
7874        double a;
7875 
7876 
7877     /* Mean elongation of the Moon from the Sun (IERS Conventions 2003). */
7878        a = fmod(          1072260.703692 +
7879                  t * ( 1602961601.2090 +
7880                  t * (        - 6.3706 +
7881                  t * (          0.006593 +
7882                  t * (        - 0.00003169 ) ) ) ), TURNAS ) * DAS2R;
7883 
7884        return a;
7885 
7886         }
7887     
7888 
7889     /**
7890     *  Fundamental argument, IERS Conventions (2003):
7891     *  mean longitude of Earth.
7892     *
7893     *<p>This function is derived from the International Astronomical Union's
7894     *  SOFA (Standards Of Fundamental Astronomy) software collection.
7895     *
7896     *<p>Status:  canonical model.
7897     *
7898     *<!-- Given: -->
7899     *     @param t      double     TDB, Julian centuries since J2000.0 (Note 1)
7900     *
7901     * <!-- Returned (function value): -->
7902     *  @return double    mean longitude of Earth, radians (Note 2)
7903     *
7904     * <p>Notes:
7905     * <ol>
7906     *
7907     * <li> Though t is strictly TDB, it is usually more convenient to use
7908     *     TT, which makes no significant difference.
7909     *
7910     * <li> The expression used is as adopted in IERS Conventions (2003) and
7911     *     comes from Souchay et al. (1999) after Simon et al. (1994).
7912     *</ol>
7913     *<p>References:
7914     *
7915     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
7916     *     IERS Technical Note No. 32, BKG (2004)
7917     *
7918     *     <p>Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
7919     *     Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
7920     *
7921     *     <p>Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
7922     *     Astron.Astrophys.Supp.Ser. 135, 111
7923     *
7924     *@version 2009 December 16
7925     *
7926     *  @since Release 20101201
7927     *
7928     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
7929     */
7930     public static double jauFae03(double t)
7931     {
7932        double a;
7933 
7934 
7935     /* Mean longitude of Earth (IERS Conventions 2003). */
7936        a = fmod(1.753470314 + 628.3075849991 * t, D2PI);
7937 
7938        return a;
7939 
7940         }
7941     
7942 
7943     /**
7944     *  Fundamental argument, IERS Conventions (2003):
7945     *  mean longitude of the Moon minus mean longitude of the ascending
7946     *  node.
7947     *
7948     *<p>This function is derived from the International Astronomical Union's
7949     *  SOFA (Standards Of Fundamental Astronomy) software collection.
7950     *
7951     *<p>Status:  canonical model.
7952     *
7953     *<!-- Given: -->
7954     *     @param t      double     TDB, Julian centuries since J2000.0 (Note 1)
7955     *
7956     * <!-- Returned (function value): -->
7957     *  @return double    F, radians (Note 2)
7958     *
7959     * <p>Notes:
7960     * <ol>
7961     *
7962     * <li> Though t is strictly TDB, it is usually more convenient to use
7963     *     TT, which makes no significant difference.
7964     *
7965     * <li> The expression used is as adopted in IERS Conventions (2003) and
7966     *     is from Simon et al. (1994).
7967     *</ol>
7968     *<p>References:
7969     *
7970     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
7971     *     IERS Technical Note No. 32, BKG (2004)
7972     *
7973     *     Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
7974     *     Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
7975     *
7976     *@version 2009 December 16
7977     *
7978     *  @since Release 20101201
7979     *
7980     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
7981     */
7982     public static double jauFaf03(double t)
7983     {
7984        double a;
7985 
7986 
7987     /* Mean longitude of the Moon minus that of the ascending node */
7988     /* (IERS Conventions 2003).                                    */
7989        a = fmod(           335779.526232 +
7990                  t * ( 1739527262.8478 +
7991                  t * (       - 12.7512 +
7992                  t * (        - 0.001037 +
7993                  t * (          0.00000417 ) ) ) ), TURNAS ) * DAS2R;
7994 
7995        return a;
7996 
7997 
7998         }
7999     
8000 
8001     /**
8002     *  Fundamental argument, IERS Conventions (2003):
8003     *  mean longitude of Jupiter.
8004     *
8005     *<p>This function is derived from the International Astronomical Union's
8006     *  SOFA (Standards Of Fundamental Astronomy) software collection.
8007     *
8008     *<p>Status:  canonical model.
8009     *
8010     *<!-- Given: -->
8011     *     @param t      double     TDB, Julian centuries since J2000.0 (Note 1)
8012     *
8013     * <!-- Returned (function value): -->
8014     *  @return double    mean longitude of Jupiter, radians (Note 2)
8015     *
8016     * <p>Notes:
8017     * <ol>
8018     *
8019     * <li> Though t is strictly TDB, it is usually more convenient to use
8020     *     TT, which makes no significant difference.
8021     *
8022     * <li> The expression used is as adopted in IERS Conventions (2003) and
8023     *     comes from Souchay et al. (1999) after Simon et al. (1994).
8024     *</ol>
8025     *<p>References:
8026     *
8027     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8028     *     IERS Technical Note No. 32, BKG (2004)
8029     *
8030     *     <p>Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8031     *     Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8032     *
8033     *     <p>Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
8034     *     Astron.Astrophys.Supp.Ser. 135, 111
8035     *
8036     *@version 2009 December 16
8037     *
8038     *  @since Release 20101201
8039     *
8040     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
8041     */
8042     public static double jauFaju03(double t)
8043     {
8044        double a;
8045 
8046 
8047     /* Mean longitude of Jupiter (IERS Conventions 2003). */
8048        a = fmod(0.599546497 + 52.9690962641 * t, D2PI);
8049 
8050        return a;
8051 
8052         }
8053     
8054 
8055     /**
8056     *  Fundamental argument, IERS Conventions (2003):
8057     *  mean anomaly of the Moon.
8058     *
8059     *<p>This function is derived from the International Astronomical Union's
8060     *  SOFA (Standards Of Fundamental Astronomy) software collection.
8061     *
8062     *<p>Status:  canonical model.
8063     *
8064     *<!-- Given: -->
8065     *     @param t      double     TDB, Julian centuries since J2000.0 (Note 1)
8066     *
8067     * <!-- Returned (function value): -->
8068     *  @return double    l, radians (Note 2)
8069     *
8070     * <p>Notes:
8071     * <ol>
8072     *
8073     * <li> Though t is strictly TDB, it is usually more convenient to use
8074     *     TT, which makes no significant difference.
8075     *
8076     * <li> The expression used is as adopted in IERS Conventions (2003) and
8077     *     is from Simon et al. (1994).
8078     *</ol>
8079     *<p>References:
8080     *
8081     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8082     *     IERS Technical Note No. 32, BKG (2004)
8083     *
8084     *     Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8085     *     Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8086     *
8087     *@version 2009 December 16
8088     *
8089     *  @since Release 20101201
8090     *
8091     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
8092     */
8093     public static double jauFal03(double t)
8094     {
8095        double a;
8096 
8097 
8098     /* Mean anomaly of the Moon (IERS Conventions 2003). */
8099        a = fmod(           485868.249036  +
8100                  t * ( 1717915923.2178 +
8101                  t * (         31.8792 +
8102                  t * (          0.051635 +
8103                  t * (        - 0.00024470 ) ) ) ), TURNAS ) * DAS2R;
8104 
8105        return a;
8106 
8107         }
8108     
8109 
8110     /**
8111     *  Fundamental argument, IERS Conventions (2003):
8112     *  mean anomaly of the Sun.
8113     *
8114     *<p>This function is derived from the International Astronomical Union's
8115     *  SOFA (Standards Of Fundamental Astronomy) software collection.
8116     *
8117     *<p>Status:  canonical model.
8118     *
8119     *<!-- Given: -->
8120     *     @param t      double     TDB, Julian centuries since J2000.0 (Note 1)
8121     *
8122     * <!-- Returned (function value): -->
8123     *  @return double    l', radians (Note 2)
8124     *
8125     * <p>Notes:
8126     * <ol>
8127     *
8128     * <li> Though t is strictly TDB, it is usually more convenient to use
8129     *     TT, which makes no significant difference.
8130     *
8131     * <li> The expression used is as adopted in IERS Conventions (2003) and
8132     *     is from Simon et al. (1994).
8133     *</ol>
8134     *<p>References:
8135     *
8136     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8137     *     IERS Technical Note No. 32, BKG (2004)
8138     *
8139     *     Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8140     *     Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8141     *
8142     *@version 2009 December 16
8143     *
8144     *  @since Release 20101201
8145     *
8146     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
8147     */
8148     public static double jauFalp03(double t)
8149     {
8150        double a;
8151 
8152 
8153     /* Mean anomaly of the Sun (IERS Conventions 2003). */
8154        a = fmod(         1287104.793048 +
8155                  t * ( 129596581.0481 +
8156                  t * (       - 0.5532 +
8157                  t * (         0.000136 +
8158                  t * (       - 0.00001149 ) ) ) ), TURNAS ) * DAS2R;
8159 
8160        return a;
8161 
8162         }
8163     
8164 
8165     /**
8166     *  Fundamental argument, IERS Conventions (2003):
8167     *  mean longitude of Mars.
8168     *
8169     *<p>This function is derived from the International Astronomical Union's
8170     *  SOFA (Standards Of Fundamental Astronomy) software collection.
8171     *
8172     *<p>Status:  canonical model.
8173     *
8174     *<!-- Given: -->
8175     *     @param t      double     TDB, Julian centuries since J2000.0 (Note 1)
8176     *
8177     * <!-- Returned (function value): -->
8178     *  @return double    mean longitude of Mars, radians (Note 2)
8179     *
8180     * <p>Notes:
8181     * <ol>
8182     *
8183     * <li> Though t is strictly TDB, it is usually more convenient to use
8184     *     TT, which makes no significant difference.
8185     *
8186     * <li> The expression used is as adopted in IERS Conventions (2003) and
8187     *     comes from Souchay et al. (1999) after Simon et al. (1994).
8188     *</ol>
8189     *<p>References:
8190     *
8191     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8192     *     IERS Technical Note No. 32, BKG (2004)
8193     *
8194     *     Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8195     *     Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8196     *
8197     *     Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
8198     *     Astron.Astrophys.Supp.Ser. 135, 111
8199     *
8200     *@version 2009 December 16
8201     *
8202     *  @since Release 20101201
8203     *
8204     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
8205     */
8206     public static double jauFama03(double t)
8207     {
8208        double a;
8209 
8210 
8211     /* Mean longitude of Mars (IERS Conventions 2003). */
8212        a = fmod(6.203480913 + 334.0612426700 * t, D2PI);
8213 
8214        return a;
8215 
8216         }
8217     
8218 
8219     /**
8220     *  Fundamental argument, IERS Conventions (2003):
8221     *  mean longitude of Mercury.
8222     *
8223     *<p>This function is derived from the International Astronomical Union's
8224     *  SOFA (Standards Of Fundamental Astronomy) software collection.
8225     *
8226     *<p>Status:  canonical model.
8227     *
8228     *<!-- Given: -->
8229     *     @param t      double     TDB, Julian centuries since J2000.0 (Note 1)
8230     *
8231     * <!-- Returned (function value): -->
8232     *  @return double    mean longitude of Mercury, radians (Note 2)
8233     *
8234     * <p>Notes:
8235     * <ol>
8236     *
8237     * <li> Though t is strictly TDB, it is usually more convenient to use
8238     *     TT, which makes no significant difference.
8239     *
8240     * <li> The expression used is as adopted in IERS Conventions (2003) and
8241     *     comes from Souchay et al. (1999) after Simon et al. (1994).
8242     *</ol>
8243     *<p>References:
8244     *
8245     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8246     *     IERS Technical Note No. 32, BKG (2004)
8247     *
8248     *     Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8249     *     Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8250     *
8251     *     Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
8252     *     Astron.Astrophys.Supp.Ser. 135, 111
8253     *
8254     *@version 2009 December 16
8255     *
8256     *  @since Release 20101201
8257     *
8258     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
8259     */
8260     public static double jauFame03(double t)
8261     {
8262        double a;
8263 
8264 
8265     /* Mean longitude of Mercury (IERS Conventions 2003). */
8266        a = fmod(4.402608842 + 2608.7903141574 * t, D2PI);
8267 
8268        return a;
8269 
8270         }
8271     
8272 
8273 
8274     /**
8275     *  Fundamental argument, IERS Conventions (2003):
8276     *  mean longitude of Neptune.
8277     *
8278     *<p>This function is derived from the International Astronomical Union's
8279     *  SOFA (Standards Of Fundamental Astronomy) software collection.
8280     *
8281     *<p>Status:  canonical model.
8282     *
8283     *<!-- Given: -->
8284     *     @param t      double     TDB, Julian centuries since J2000.0 (Note 1)
8285     *
8286     * <!-- Returned (function value): -->
8287     *  @return double    mean longitude of Neptune, radians (Note 2)
8288     *
8289     * <p>Notes:
8290     * <ol>
8291     *
8292     * <li> Though t is strictly TDB, it is usually more convenient to use
8293     *     TT, which makes no significant difference.
8294     *
8295     * <li> The expression used is as adopted in IERS Conventions (2003) and
8296     *     is adapted from Simon et al. (1994).
8297     *</ol>
8298     *<p>References:
8299     *
8300     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8301     *     IERS Technical Note No. 32, BKG (2004)
8302     *
8303     *     Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8304     *     Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8305     *
8306     *@version 2009 December 16
8307     *
8308     *  @since Release 20101201
8309     *
8310     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
8311     */
8312     public static double jauFane03(double t)
8313     {
8314        double a;
8315 
8316 
8317     /* Mean longitude of Neptune (IERS Conventions 2003). */
8318        a = fmod(5.311886287 + 3.8133035638 * t, D2PI);
8319 
8320        return a;
8321 
8322         }
8323     
8324 
8325     /**
8326     *  Fundamental argument, IERS Conventions (2003):
8327     *  mean longitude of the Moon's ascending node.
8328     *
8329     *<p>This function is derived from the International Astronomical Union's
8330     *  SOFA (Standards Of Fundamental Astronomy) software collection.
8331     *
8332     *<p>Status:  canonical model.
8333     *
8334     *<!-- Given: -->
8335     *     @param t      double     TDB, Julian centuries since J2000.0 (Note 1)
8336     *
8337     * <!-- Returned (function value): -->
8338     *  @return double    Omega, radians (Note 2)
8339     *
8340     * <p>Notes:
8341     * <ol>
8342     *
8343     * <li> Though t is strictly TDB, it is usually more convenient to use
8344     *     TT, which makes no significant difference.
8345     *
8346     * <li> The expression used is as adopted in IERS Conventions (2003) and
8347     *     is from Simon et al. (1994).
8348     *</ol>
8349     *<p>References:
8350     *
8351     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8352     *     IERS Technical Note No. 32, BKG (2004)
8353     *
8354     *     Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8355     *     Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8356     *
8357     *@version 2009 December 16
8358     *
8359     *  @since Release 20101201
8360     *
8361     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
8362     */
8363     public static double jauFaom03(double t)
8364     {
8365        double a;
8366 
8367 
8368     /* Mean longitude of the Moon's ascending node */
8369     /* (IERS Conventions 2003).                    */
8370        a = fmod(          450160.398036 +
8371                  t * ( - 6962890.5431 +
8372                  t * (         7.4722 +
8373                  t * (         0.007702 +
8374                  t * (       - 0.00005939 ) ) ) ), TURNAS ) * DAS2R;
8375 
8376        return a;
8377 
8378         }
8379     
8380 
8381     /**
8382     *  Fundamental argument, IERS Conventions (2003):
8383     *  general accumulated precession in longitude.
8384     *
8385     *<p>This function is derived from the International Astronomical Union's
8386     *  SOFA (Standards Of Fundamental Astronomy) software collection.
8387     *
8388     *<p>Status:  canonical model.
8389     *
8390     *<!-- Given: -->
8391     *     @param t      double     TDB, Julian centuries since J2000.0 (Note 1)
8392     *
8393     * <!-- Returned (function value): -->
8394     *  @return double    general precession in longitude, radians (Note 2)
8395     *
8396     * <p>Notes:
8397     * <ol>
8398     *
8399     * <li> Though t is strictly TDB, it is usually more convenient to use
8400     *     TT, which makes no significant difference.
8401     *
8402     * <li> The expression used is as adopted in IERS Conventions (2003).  It
8403     *     is taken from Kinoshita &amp; Souchay (1990) and comes originally
8404     *     from Lieske et al. (1977).
8405     *</ol>
8406     *<p>References:
8407     *
8408     *     Kinoshita, H. and Souchay J. 1990, Celest.Mech. and Dyn.Astron.
8409     *     48, 187
8410     *
8411     *     <p>Lieske, J.H., Lederle, T., Fricke, W. &amp; Morando, B. 1977,
8412     *     Astron.Astrophys. 58, 1-16
8413     *
8414     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8415     *     IERS Technical Note No. 32, BKG (2004)
8416     *
8417     *@version 2009 December 16
8418     *
8419     *  @since Release 20101201
8420     *
8421     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
8422     */
8423     public static double jauFapa03(double t)
8424     {
8425        double a;
8426 
8427 
8428     /* General accumulated precession in longitude. */
8429        a = (0.024381750 + 0.00000538691 * t) * t;
8430 
8431        return a;
8432 
8433         }
8434     
8435 
8436     /**
8437     *  Fundamental argument, IERS Conventions (2003):
8438     *  mean longitude of Saturn.
8439     *
8440     *<p>This function is derived from the International Astronomical Union's
8441     *  SOFA (Standards Of Fundamental Astronomy) software collection.
8442     *
8443     *<p>Status:  canonical model.
8444     *
8445     *<!-- Given: -->
8446     *     @param t      double     TDB, Julian centuries since J2000.0 (Note 1)
8447     *
8448     * <!-- Returned (function value): -->
8449     *  @return double    mean longitude of Saturn, radians (Note 2)
8450     *
8451     * <p>Notes:
8452     * <ol>
8453     *
8454     * <li> Though t is strictly TDB, it is usually more convenient to use
8455     *     TT, which makes no significant difference.
8456     *
8457     * <li> The expression used is as adopted in IERS Conventions (2003) and
8458     *     comes from Souchay et al. (1999) after Simon et al. (1994).
8459     *</ol>
8460     *<p>References:
8461     *
8462     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8463     *     IERS Technical Note No. 32, BKG (2004)
8464     *
8465     *     Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8466     *     Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8467     *
8468     *     Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
8469     *     Astron.Astrophys.Supp.Ser. 135, 111
8470     *
8471     *@version 2009 December 16
8472     *
8473     *  @since Release 20101201
8474     *
8475     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
8476     */
8477     public static double jauFasa03(double t)
8478     {
8479        double a;
8480 
8481 
8482     /* Mean longitude of Saturn (IERS Conventions 2003). */
8483        a = fmod(0.874016757 + 21.3299104960 * t, D2PI);
8484 
8485        return a;
8486 
8487         }
8488     
8489 
8490     /**
8491     *  Fundamental argument, IERS Conventions (2003):
8492     *  mean longitude of Uranus.
8493     *
8494     *<p>This function is derived from the International Astronomical Union's
8495     *  SOFA (Standards Of Fundamental Astronomy) software collection.
8496     *
8497     *<p>Status:  canonical model.
8498     *
8499     *<!-- Given: -->
8500     *     @param t      double     TDB, Julian centuries since J2000.0 (Note 1)
8501     *
8502     *  Returned  (function value):
8503     *           double    mean longitude of Uranus, radians (Note 2)
8504     *
8505     * <p>Notes:
8506     * <ol>
8507     *
8508     * <li> Though t is strictly TDB, it is usually more convenient to use
8509     *     TT, which makes no significant difference.
8510     *
8511     * <li> The expression used is as adopted in IERS Conventions (2003) and
8512     *     is adapted from Simon et al. (1994).
8513     *</ol>
8514     *<p>References:
8515     *
8516     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8517     *     IERS Technical Note No. 32, BKG (2004)
8518     *
8519     *     Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8520     *     Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8521     *
8522     *@version 2009 December 16
8523     *
8524     *  @since Release 20101201
8525     *
8526     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
8527     */
8528     public static double jauFaur03(double t)
8529     {
8530        double a;
8531 
8532 
8533     /* Mean longitude of Uranus (IERS Conventions 2003). */
8534        a = fmod(5.481293872 + 7.4781598567 * t, D2PI);
8535 
8536        return a;
8537 
8538         }
8539     
8540 
8541     /**
8542     *  Fundamental argument, IERS Conventions (2003):
8543     *  mean longitude of Venus.
8544     *
8545     *<p>This function is derived from the International Astronomical Union's
8546     *  SOFA (Standards Of Fundamental Astronomy) software collection.
8547     *
8548     *<p>Status:  canonical model.
8549     *
8550     *<!-- Given: -->
8551     *     @param t      double     TDB, Julian centuries since J2000.0 (Note 1)
8552     *
8553     * <!-- Returned (function value): -->
8554     *  @return double    mean longitude of Venus, radians (Note 2)
8555     *
8556     * <p>Notes:
8557     * <ol>
8558     *
8559     * <li> Though t is strictly TDB, it is usually more convenient to use
8560     *     TT, which makes no significant difference.
8561     *
8562     * <li> The expression used is as adopted in IERS Conventions (2003) and
8563     *     comes from Souchay et al. (1999) after Simon et al. (1994).
8564     *</ol>
8565     *<p>References:
8566     *
8567     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8568     *     IERS Technical Note No. 32, BKG (2004)
8569     *
8570     *     Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8571     *     Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8572     *
8573     *     Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
8574     *     Astron.Astrophys.Supp.Ser. 135, 111
8575     *
8576     *@version 2009 December 16
8577     *
8578     *  @since Release 20101201
8579     *
8580     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
8581     */
8582     public static double jauFave03(double t)
8583     {
8584        double a;
8585 
8586 
8587     /* Mean longitude of Venus (IERS Conventions 2003). */
8588        a = fmod(3.176146697 + 1021.3285546211 * t, D2PI);
8589 
8590        return a;
8591 
8592         }
8593     
8594 
8595     /**
8596     *  Transform FK5 (J2000.0) star data into the Hipparcos system.
8597     *
8598     *<p>This function is derived from the International Astronomical Union's
8599     *  SOFA (Standards Of Fundamental Astronomy) software collection.
8600     *
8601     *<p>Status:  support function.
8602     *
8603     *  Given (all FK5, equinox J2000.0, epoch J2000.0):
8604     *     r5      double    RA (radians)
8605     *     d5      double    Dec (radians)
8606     *     dr5     double    proper motion in RA (dRA/dt, rad/Jyear)
8607     *     dd5     double    proper motion in Dec (dDec/dt, rad/Jyear)
8608     *     px5     double    parallax (arcsec)
8609     *     rv5     double    radial velocity (km/s, positive = receding)
8610     *
8611     *  Returned (all Hipparcos, epoch J2000.0):
8612     *     rh      double    RA (radians)
8613     *     dh      double    Dec (radians)
8614     *     drh     double    proper motion in RA (dRA/dt, rad/Jyear)
8615     *     ddh     double    proper motion in Dec (dDec/dt, rad/Jyear)
8616     *     pxh     double    parallax (arcsec)
8617     *     rvh     double    radial velocity (km/s, positive = receding)
8618     *
8619     * <p>Notes:
8620     * <ol>
8621     *
8622     * <li> This function transforms FK5 star positions and proper motions
8623     *     into the system of the Hipparcos catalog.
8624     *
8625     * <li> The proper motions in RA are dRA/dt rather than
8626     *     cos(Dec)*dRA/dt, and are per year rather than per century.
8627     *
8628     * <li> The FK5 to Hipparcos transformation is modeled as a pure
8629     *     rotation and spin;  zonal errors in the FK5 catalog are not
8630     *     taken into account.
8631     *
8632     * <li> See also {@link #jauH2fk5}, {@link #jauFk5hz}, {@link #jauHfk5z}.
8633     *</ol>
8634     *<p>Called:<ul>
8635     *     <li>{@link #jauStarpv} star catalog data to space motion pv-vector
8636     *     <li>{@link #jauFk5hip} FK5 to Hipparcos rotation and spin
8637     *     <li>{@link #jauRxp} product of r-matrix and p-vector
8638     *     <li>{@link #jauPxp} vector product of two p-vectors
8639     *     <li>{@link #jauPpp} p-vector plus p-vector
8640     *     <li>{@link #jauPvstar} space motion pv-vector to star catalog data
8641     * </ul>
8642     *<p>Reference:
8643     *
8644     *     <p>F.Mignard &amp; M.Froeschle, Astron. Astrophys. 354, 732-739 (2000).
8645     *
8646     *@version 2009 December 17
8647     *
8648     *  @since Release 20101201
8649     *
8650     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
8651     */
8652     public static CatalogCoords jauFk52h(double r5, double d5,
8653                   double dr5, double dd5, double px5, double rv5)
8654     {
8655        int i;
8656        double pv5[][] = new double[2][3], r5h[][] = new double[3][3], s5h[] = new double[3], wxp[] = new double[3], vv[] = new double[3], pvh[][] = new double[2][3];
8657 
8658 
8659     /* FK5 barycentric position/velocity pv-vector (normalized). */
8660        jauStarpv(r5, d5, dr5, dd5, px5, rv5, pv5);
8661 
8662     /* FK5 to Hipparcos orientation matrix and spin vector. */
8663        jauFk5hip(r5h, s5h);
8664 
8665     /* Make spin units per day instead of per year. */
8666        for ( i = 0; i < 3; s5h[i++] /= 365.25 );
8667 
8668     /* Orient the FK5 position into the Hipparcos system. */
8669        pvh[0] = jauRxp(r5h, pv5[0]);
8670 
8671     /* Apply spin to the position giving an extra space motion component. */
8672        wxp = jauPxp(pv5[0],s5h);
8673 
8674     /* Add this component to the FK5 space motion. */
8675        vv = jauPpp(wxp, pv5[1]);
8676 
8677     /* Orient the FK5 space motion into the Hipparcos system. */
8678        pvh[1] = jauRxp(r5h, vv);
8679 
8680     /* Hipparcos pv-vector to spherical. */
8681        CatalogCoords cat = null;
8682        try {
8683            cat = jauPvstar(pvh);
8684        } catch (JSOFAInternalError e) {
8685            //original code ignored possibility of error too...
8686            e.printStackTrace();
8687        }
8688 
8689        return cat;
8690 
8691         }
8692     
8693 
8694     /**
8695     *  FK5 to Hipparcos rotation and spin.
8696     *
8697     *<p>This function is derived from the International Astronomical Union's
8698     *  SOFA (Standards Of Fundamental Astronomy) software collection.
8699     *
8700     *<p>Status:  support function.
8701     *
8702     *<!-- Returned: -->
8703     *     @param r5h    double[3][3]    <u>returned</u> r-matrix: FK5 rotation wrt Hipparcos (Note 2)
8704     *     @param s5h    double[3]       <u>returned</u> r-vector: FK5 spin wrt Hipparcos (Note 3)
8705     *
8706     * <p>Notes:
8707     * <ol>
8708     *
8709     * <li> This function models the FK5 to Hipparcos transformation as a
8710     *     pure rotation and spin;  zonal errors in the FK5 catalogue are
8711     *     not taken into account.
8712     *
8713     * <li> The r-matrix r5h operates in the sense:
8714     *
8715     *           P_Hipparcos = r5h x P_FK5
8716     *
8717     *     where P_FK5 is a p-vector in the FK5 frame, and P_Hipparcos is
8718     *     the equivalent Hipparcos p-vector.
8719     *
8720     * <li> The r-vector s5h represents the time derivative of the FK5 to
8721     *     Hipparcos rotation.  The units are radians per year (Julian,
8722     *     TDB).
8723     *</ol>
8724     *<p>Called:<ul>
8725     *     <li>{@link #jauRv2m} r-vector to r-matrix
8726     * </ul>
8727     *<p>Reference:
8728     *
8729     *     <p>F.Mignard &amp; M.Froeschle, Astron. Astrophys. 354, 732-739 (2000).
8730     *
8731     *@version 2009 March 14
8732     *
8733     *  @since Release 20101201
8734     *
8735     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
8736     */
8737     public static void jauFk5hip(double r5h[][], double s5h[] )
8738     {
8739        double v[] = new double[3];
8740 
8741     /* FK5 wrt Hipparcos orientation and spin (radians, radians/year) */
8742        double epx, epy, epz;
8743        double omx, omy, omz;
8744 
8745 
8746        epx = -19.9e-3 * DAS2R;
8747        epy =  -9.1e-3 * DAS2R;
8748        epz =  22.9e-3 * DAS2R;
8749 
8750        omx = -0.30e-3 * DAS2R;
8751        omy =  0.60e-3 * DAS2R;
8752        omz =  0.70e-3 * DAS2R;
8753 
8754     /* FK5 to Hipparcos orientation expressed as an r-vector. */
8755        v[0] = epx;
8756        v[1] = epy;
8757        v[2] = epz;
8758 
8759     /* Re-express as an r-matrix. */
8760        double[][] r5ht = jauRv2m(v);
8761        jauCr(r5ht, r5h);
8762 
8763     /* Hipparcos wrt FK5 spin expressed as an r-vector. */
8764        s5h[0] = omx;
8765        s5h[1] = omy;
8766        s5h[2] = omz;
8767 
8768        return;
8769 
8770         }
8771     
8772   /**
8773   * Position consisting of (&alpha;, &delta;) pairs in radians. Where &alpha; is right ascension (or longitude angle) and &delta; is declination (or latitude angle).
8774  * @author Paul Harrison (paul.harrison@manchester.ac.uk) 1 Feb 2010
8775  * 
8776  * @since AIDA Stage 1
8777  * @TODO needs better name cf {@link SphericalPosition}
8778  */
8779 public static class SphericalCoordinate {
8780       public double alpha;
8781       public double delta;
8782       public SphericalCoordinate(double alpha, double delta){
8783           this.alpha = alpha;
8784           this.delta = delta;
8785       }
8786   }
8787 
8788 /**
8789  * Spherical coordinate with equation of origins .
8790  * @author Paul Harrison (paul.harrison@manchester.ac.uk) 28 Mar 2014
8791  * @version $Revision$ $date$
8792  */
8793 public static class SphericalCoordinateEO {
8794     SphericalCoordinate pos;
8795     double eo;
8796     /**
8797      * @param pos
8798      * @param eo
8799      */
8800     public SphericalCoordinateEO(SphericalCoordinate pos, double eo) {
8801         this.pos = pos;
8802         this.eo = eo;
8803     }
8804     
8805     
8806 }
8807     /**
8808     *  Transform an FK5 (J2000.0) star position into the system of the
8809     *  Hipparcos catalogue, assuming zero Hipparcos proper motion.
8810     *
8811     *<p>This function is derived from the International Astronomical Union's
8812     *  SOFA (Standards Of Fundamental Astronomy) software collection.
8813     *
8814     *<p>Status:  support function.
8815     *
8816     *<!-- Given: -->
8817     *     @param r5            double    FK5 RA (radians), equinox J2000.0, at date
8818     *     @param d5            double    FK5 Dec (radians), equinox J2000.0, at date
8819     *     @param date1 double    TDB date (Notes 1,2)
8820     *     @param date2 double    TDB date (Notes 1,2) 
8821     *
8822     *<!-- Returned: -->
8823     *     @return rh            double     <u>returned</u> Hipparcos RA (radians)
8824     *             dh            double     <u>returned</u> Hipparcos Dec (radians)
8825     *
8826     * <p>Notes:
8827     * <ol>
8828     *
8829     * <li> This function converts a star position from the FK5 system to
8830     *     the Hipparcos system, in such a way that the Hipparcos proper
8831     *     motion is zero.  Because such a star has, in general, a non-zero
8832     *     proper motion in the FK5 system, the function requires the date
8833     *     at which the position in the FK5 system was determined.
8834     *
8835     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
8836     *     convenient way between the two arguments.  For example,
8837     *     JD(TT)=2450123.7 could be expressed in any of these ways,
8838     *     among others:
8839     *<pre>
8840     *            date1          date2
8841     *
8842     *         2450123.7           0.0       (JD method)
8843     *         2451545.0       -1421.3       (J2000 method)
8844     *         2400000.5       50123.2       (MJD method)
8845     *         2450123.5           0.2       (date &amp; time method)
8846     *</pre>
8847     *     The JD method is the most natural and convenient to use in
8848     *     cases where the loss of several decimal digits of resolution
8849     *     is acceptable.  The J2000 method is best matched to the way
8850     *     the argument is handled internally and will deliver the
8851     *     optimum resolution.  The MJD method and the date &amp; time methods
8852     *     are both good compromises between resolution and convenience.
8853     *
8854     * <li> The FK5 to Hipparcos transformation is modeled as a pure
8855     *     rotation and spin;  zonal errors in the FK5 catalogue are not
8856     *     taken into account.
8857     *
8858     * <li> The position returned by this function is in the Hipparcos
8859     *     reference system but at date date1+date2.
8860     *
8861     * <li> See also jauFk52h, jauH2fk5, jauHfk5z.
8862     *</ol>
8863     *<p>Called:<ul>
8864     *     <li>{@link #jauS2c} spherical coordinates to unit vector
8865     *     <li>{@link #jauFk5hip} FK5 to Hipparcos rotation and spin
8866     *     <li>{@link #jauSxp} multiply p-vector by scalar
8867     *     <li>{@link #jauRv2m} r-vector to r-matrix
8868     *     <li>{@link #jauTrxp} product of transpose of r-matrix and p-vector
8869     *     <li>{@link #jauPxp} vector product of two p-vectors
8870     *     <li>{@link #jauC2s} p-vector to spherical
8871     *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
8872     * </ul>
8873     *<p>Reference:
8874     *
8875     *     <p>F.Mignard &amp; M.Froeschle, 2000, Astron.Astrophys. 354, 732-739.
8876     *
8877     *@version 2009 December 17
8878     *
8879     *  @since Release 20101201
8880     *
8881     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
8882     */
8883     public static SphericalCoordinate jauFk5hz(double r5, double d5, double date1, double date2
8884                   )
8885     {
8886        double t, p5e[] = new double[3], r5h[][] = new double[3][3], s5h[] = new double[3], vst[] = new double[3], rst[][] = new double[3][3], p5[] = new double[3],
8887               ph[] = new double[3];
8888 
8889 
8890     /* Interval from given date to fundamental epoch J2000.0 (JY). */
8891        t = - ((date1 - DJ00) + date2) / DJY;
8892 
8893     /* FK5 barycentric position vector. */
8894        p5e = jauS2c(r5,d5);
8895 
8896     /* FK5 to Hipparcos orientation matrix and spin vector. */
8897        jauFk5hip(r5h, s5h);
8898 
8899     /* Accumulated Hipparcos wrt FK5 spin over that interval. */
8900        vst = jauSxp(t,s5h);
8901 
8902     /* Express the accumulated spin as a rotation matrix. */
8903        rst = jauRv2m(vst);
8904 
8905     /* Derotate the vector's FK5 axes back to date. */
8906        p5 = jauTrxp(rst, p5e);
8907 
8908     /* Rotate the vector into the Hipparcos system. */
8909        ph = jauRxp(r5h, p5);
8910 
8911     /* Hipparcos vector to spherical. */
8912        SphericalCoordinate sc = jauC2s(ph);
8913        double rh = jauAnp(sc.alpha);
8914        sc.alpha = rh;
8915        
8916        return sc;
8917 
8918         }
8919     
8920 
8921     /**
8922     *  Form rotation matrix given the Fukushima-Williams angles.
8923     *
8924     *<p>This function is derived from the International Astronomical Union's
8925     *  SOFA (Standards Of Fundamental Astronomy) software collection.
8926     *
8927     *<p>Status:  support function.
8928     *
8929     *<!-- Given: -->
8930     *     @param gamb      double          F-W angle gamma_bar (radians)
8931     *     @param phib      double          F-W angle phi_bar (radians)
8932     *     @param psi       double          F-W angle psi (radians)
8933     *     @param eps       double          F-W angle epsilon (radians)
8934     *
8935     *<!-- Returned: -->
8936     *     @return r         double[3][3]     <u>returned</u> rotation matrix
8937     *
8938     * <p>Notes:
8939     * <ol>
8940     *
8941     * <li> Naming the following points:
8942     *
8943     *           e = J2000.0 ecliptic pole,
8944     *           p = GCRS pole,
8945     *           E = ecliptic pole of date,
8946     *     and   P = CIP,
8947     *
8948     *     the four Fukushima-Williams angles are as follows:
8949     *
8950     *        gamb = gamma = epE
8951     *        phib = phi = pE
8952     *        psi = psi = pEP
8953     *        eps = epsilon = EP
8954     *
8955     * <li> The matrix representing the combined effects of frame bias,
8956     *     precession and nutation is:
8957     *
8958     *        NxPxB = R_1(-eps).R_3(-psi).R_1(phib).R_3(gamb)
8959     *
8960     * <li> Three different matrices can be constructed, depending on the
8961     *     supplied angles:
8962     *
8963     *     o  To obtain the nutation x precession x frame bias matrix,
8964     *        generate the four precession angles, generate the nutation
8965     *        components and add them to the psi_bar and epsilon_A angles,
8966     *        and call the present function.
8967     *
8968     *     o  To obtain the precession x frame bias matrix, generate the
8969     *        four precession angles and call the present function.
8970     *
8971     *     o  To obtain the frame bias matrix, generate the four precession
8972     *        angles for date J2000.0 and call the present function.
8973     *
8974     *     The nutation-only and precession-only matrices can if necessary
8975     *     be obtained by combining these three appropriately.
8976     *</ol>
8977     *<p>Called:<ul>
8978     *     <li>{@link #jauIr} initialize r-matrix to identity
8979     *     <li>{@link #jauRz} rotate around Z-axis
8980     *     <li>{@link #jauRx} rotate around X-axis
8981     * </ul>
8982     *<p>Reference:
8983     *
8984     *     Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351
8985     *
8986     *@version 2009 December 17
8987     *
8988     *  @since Release 20101201
8989     *
8990     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
8991     */
8992     public static double[][] jauFw2m(double gamb, double phib, double psi, double eps)
8993     {
8994     /* Construct the matrix. */
8995        double r[][] = new double[3][3];
8996        jauIr(r);
8997        jauRz(gamb, r);
8998        jauRx(phib, r);
8999        jauRz(-psi, r);
9000        jauRx(-eps, r);
9001 
9002        return r;
9003 
9004         }
9005     
9006 
9007     /**
9008     *  CIP X,Y given Fukushima-Williams bias-precession-nutation angles.
9009     *
9010     *<p>This function is derived from the International Astronomical Union's
9011     *  SOFA (Standards Of Fundamental Astronomy) software collection.
9012     *
9013     *<p>Status:  support function.
9014     *
9015     *<!-- Given: -->
9016     *     @param gamb      double     F-W angle gamma_bar (radians)
9017     *     @param phib      double     F-W angle phi_bar (radians)
9018     *     @param psi       double     F-W angle psi (radians)
9019     *     @param eps       double     F-W angle epsilon (radians)
9020     *
9021     *<!-- Returned: -->
9022     *     @return CIP unit vector X,Y
9023     *
9024     * <p>Notes:
9025     * <ol>
9026     *
9027     * <li> Naming the following points:
9028     *
9029     *           e = J2000.0 ecliptic pole,
9030     *           p = GCRS pole
9031     *           E = ecliptic pole of date,
9032     *     and   P = CIP,
9033     *
9034     *     the four Fukushima-Williams angles are as follows:
9035     *
9036     *        gamb = gamma = epE
9037     *        phib = phi = pE
9038     *        psi = psi = pEP
9039     *        eps = epsilon = EP
9040     *
9041     * <li> The matrix representing the combined effects of frame bias,
9042     *     precession and nutation is:
9043     *
9044     *        NxPxB = R_1(-epsA).R_3(-psi).R_1(phib).R_3(gamb)
9045     *
9046     *       The returned values x,y are elements [2][0] and [2][1] of the
9047     *       matrix.  Near J2000.0, they are essentially angles in radians
9048     *       
9049     *     X,Y are elements (3,1) and (3,2) of the matrix.
9050     *</ol>
9051     *<p>Called:<ul>
9052     *     <li>{@link #jauFw2m} F-W angles to r-matrix
9053     *     <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
9054     * </ul>
9055     *<p>Reference:
9056     *
9057     *     Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351
9058     *
9059     *@version 2009 December 17
9060     *
9061     *  @since Release 20101201
9062     *
9063     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
9064     */
9065     public static CelestialIntermediatePole jauFw2xy(double gamb, double phib, double psi, double eps)
9066     {
9067        double r[][] = new double[3][3];
9068 
9069 
9070     /* Form NxPxB matrix. */
9071        r = jauFw2m(gamb, phib, psi, eps);
9072 
9073     /* Extract CIP X,Y. */
9074        return jauBpn2xy(r);
9075 
9076     }
9077 
9078     /**
9079      * Geodetic coordinates.
9080      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
9081      * 
9082      * @since AIDA Stage 1
9083      */
9084     public static class GeodeticCoord {
9085         /** longitude (radians, east +ve) */
9086         public  double elong;
9087         /** latitude (geodetic, radians) */
9088         public double phi;
9089         /** height above ellipsoid (geodetic) */
9090         public double height;
9091         public GeodeticCoord(double elong, double phi, double height) {
9092             this.elong = elong;
9093             this.phi = phi;
9094             this.height = height;
9095         }
9096 }
9097     /**
9098     *  Transform geocentric coordinates to geodetic using the specified
9099     *  reference ellipsoid.
9100     *
9101     *<p>This function is derived from the International Astronomical Union's
9102     *  JSOFA (Standards of Fundamental Astronomy) software collection.
9103     *
9104     *<p>Status:  canonical transformation.
9105     *
9106     *<!-- Given: -->
9107     *     @param n        int         ellipsoid identifier (Note 1)
9108     *     @param xyz      double[3]   geocentric vector (Note 2)
9109     *
9110     *<!-- Returned: -->
9111     *     @return elong    double       <u>returned</u> longitude (radians, east +ve)
9112     *             phi      double       <u>returned</u> latitude (geodetic, radians, Note 3)
9113     *             height   double       <u>returned</u> height above ellipsoid (geodetic, Notes 2,3)
9114     *
9115     * <!-- Returned (function value): -->
9116     *  @throws JSOFAIllegalParameter
9117     *                          0 = OK
9118     *                         -1 = illegal identifier (Note 3)
9119     *                         -2 = internal error (Note 3)
9120     *
9121     * <p>Notes:
9122     * <ol>
9123     *
9124     * <li> The identifier n is a number that specifies the choice of
9125     *     reference ellipsoid.  The following are supported:
9126     *
9127     *        n   ellipsoid
9128     *
9129     *        1    WGS84
9130     *        2    GRS80
9131     *
9132     *     The number n has no significance outside the JSOFA software.
9133     *
9134     * <li> The geocentric vector (xyz, given) and height (height, returned)
9135     *     are in meters.
9136     *
9137     * <li> An error status -1 means that the identifier n is illegal.  An
9138     *     error status -2 is theoretically impossible.  In all error cases,
9139     *     phi and height are both set to -1e9.
9140     *
9141     * <li> The inverse transformation is performed in the function jauGd2gc.
9142     *</ol>
9143     *<p>Called:<ul>
9144     *     <li>{@link #jauEform} Earth reference ellipsoids
9145     *     <li>{@link #jauGc2gde} geocentric to geodetic transformation, general
9146     * </ul>
9147     *@version 2010 January 18
9148     *
9149     *  @since Release 20101201
9150     *
9151     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
9152     */
9153     public static GeodeticCoord jauGc2gd ( int n, double xyz[] ) throws JSOFAIllegalParameter
9154     {
9155       GeodeticCoord gc;
9156 
9157 
9158     /* Obtain reference ellipsoid parameters. */
9159        ReferenceEllipsoid el = jauEform ( n );
9160 
9161     /* If OK, transform x,y,z to longitude, geodetic latitude, height. */
9162        gc = jauGc2gde ( el.a, el.f, xyz);
9163 
9164     /* Return the status. */
9165        return gc;
9166 
9167     
9168     }
9169     
9170    /**
9171     *  Transform geocentric coordinates to geodetic for a reference
9172     *  ellipsoid of specified form.
9173     *
9174     *<p>This function is derived from the International Astronomical Union's
9175     *  JSOFA (Standards of Fundamental Astronomy) software collection.
9176     *
9177     *<p>Status:  support function.
9178     *
9179     *<!-- Given: -->
9180     *     @param a        double      equatorial radius (Notes 2,4)
9181     *     @param f        double      flattening (Note 3)
9182     *     @param xyz      double[3]   geocentric vector (Note 4)
9183     *
9184     *<!-- Returned: -->
9185     *     @return GeodeticCoord   logitude  (radians, east +ve) latitude (geodetic, radians)  height above ellipsoid (geodetic, Note 4)
9186     *
9187     *  @throws JSOFAIllegalParameter 
9188     *            int       status:
9189     *               
9190     *                         -1 = illegal a
9191     *                         -2 = illegal f
9192     *
9193     * <p>Notes:
9194     * <ol>
9195     *
9196     * <li> This function is based on the GCONV2H Fortran subroutine by
9197     *     Toshio Fukushima (see reference).
9198     *
9199     * <li> The equatorial radius, a, can be in any units, but meters is
9200     *     the conventional choice.
9201     *
9202     * <li> The flattening, f, is (for the Earth) a value around 0.00335,
9203     *     i.e. around 1/298.
9204     *
9205     * <li> The equatorial radius, a, and the geocentric vector, xyz,
9206     *     must be given in the same units, and determine the units of
9207     *     the returned height, height.
9208     *
9209     * <li> If an error occurs (status &lt; 0), elong, phi and height are
9210     *     unchanged.
9211     *
9212     * <li> The inverse transformation is performed in the function
9213     *     jauGd2gce.
9214     *
9215     * <li> The transformation for a standard ellipsoid (such as WGS84) can
9216     *     more conveniently be performed by calling jauGc2gd, which uses a
9217     *     numerical code (1 for WGS84) to identify the required A and F
9218     *     values.
9219     *</ol>
9220     *<p>Reference:
9221     *
9222     *     Fukushima, T., "Transformation from Cartesian to geodetic
9223     *     coordinates accelerated by Halley's method", J.Geodesy (2006)
9224     *     79: 689-693
9225     *
9226     *@version 2009 November 2
9227     *
9228     *  @since Release 20101201
9229     *
9230     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
9231  * 
9232     */
9233     public static GeodeticCoord jauGc2gde ( double a, double f, double xyz[] ) throws JSOFAIllegalParameter
9234         {
9235        double aeps2, e2, e4t, ec2, ec, b, x, y, z, p2, absz, p, s0, pn, zc,
9236                      c0, c02, c03, s02, s03, a02, a0, a03, d0, f0, b0, s1,
9237                      cc, s12, cc2;
9238 
9239       double  phi, height;
9240     /* ------------- */
9241     /* Preliminaries */
9242     /* ------------- */
9243 
9244     /* Validate ellipsoid parameters. */
9245        if ( f < 0.0 || f >= 1.0 ) throw new JSOFAIllegalParameter("bad f", -1);
9246        if ( a <= 0.0 ) throw new JSOFAIllegalParameter("bad a", -2);
9247 
9248     /* Functions of ellipsoid parameters (with further validation of f). */
9249        aeps2 = a*a * 1e-32;
9250        e2 = (2.0 - f) * f;
9251        e4t = e2*e2 * 1.5;
9252        ec2 = 1.0 - e2;
9253        if ( ec2 <= 0.0 ) throw new JSOFAIllegalParameter("bad f", -1);
9254        ec = sqrt(ec2);
9255        b = a * ec;
9256 
9257     /* Cartesian components. */
9258        x = xyz[0];
9259        y = xyz[1];
9260        z = xyz[2];
9261 
9262     /* Distance from polar axis squared. */
9263        p2 = x*x + y*y;
9264 
9265     /* Longitude. */
9266        double elong = p2 > 0.0 ? atan2(y, x) : 0.0;
9267 
9268     /* Unsigned z-coordinate. */
9269        absz = abs(z);
9270 
9271     /* Proceed unless polar case. */
9272        if ( p2 > aeps2 ) {
9273 
9274        /* Distance from polar axis. */
9275           p = sqrt(p2);
9276 
9277        /* Normalization. */
9278           s0 = absz / a;
9279           pn = p / a;
9280           zc = ec * s0;
9281 
9282        /* Prepare Newton correction factors. */
9283           c0 = ec * pn;
9284           c02 = c0 * c0;
9285           c03 = c02 * c0;
9286           s02 = s0 * s0;
9287           s03 = s02 * s0;
9288           a02 = c02 + s02;
9289           a0 = sqrt(a02);
9290           a03 = a02 * a0;
9291           d0 = zc*a03 + e2*s03;
9292           f0 = pn*a03 - e2*c03;
9293 
9294        /* Prepare Halley correction factor. */
9295           b0 = e4t * s02 * c02 * pn * (a0 - ec);
9296           s1 = d0*f0 - b0*s0;
9297           cc = ec * (f0*f0 - b0*c0);
9298 
9299        /* Evaluate latitude and height. */
9300           phi = atan(s1/cc);
9301           s12 = s1 * s1;
9302           cc2 = cc * cc;
9303           height = (p*cc + absz*s1 - a * sqrt(ec2*s12 + cc2)) /
9304                                                             sqrt(s12 + cc2);
9305        } else {
9306 
9307        /* Exception: pole. */
9308           phi = DPI / 2.0;
9309           height = absz - b;
9310        }
9311 
9312     /* Restore sign of latitude. */
9313        if ( z < 0 ) phi = -phi;
9314 
9315     /* OK status. */
9316        return new GeodeticCoord(elong, phi, height);
9317 
9318     
9319     }
9320     
9321 
9322     /**
9323     *  Transform geodetic coordinates to geocentric using the specified
9324     *  reference ellipsoid.
9325     *
9326     *<p>This function is derived from the International Astronomical Union's
9327     *  JSOFA (Standards of Fundamental Astronomy) software collection.
9328     *
9329     *<p>Status:  canonical transformation.
9330     *
9331     *<!-- Given: -->
9332     *     @param n        int         ellipsoid identifier (Note 1)
9333     *     @param elong    double      longitude (radians, east +ve)
9334     *     @param phi      double      latitude (geodetic, radians, Note 3)
9335     *     @param height   double      height above ellipsoid (geodetic, Notes 2,3)
9336     *
9337     *<!-- Returned: -->
9338     *     @return xyz      double[3]    <u>returned</u> geocentric vector (Note 2)
9339     *
9340     * <!-- Returned (function value): -->
9341     *  @throws JSOFAIllegalParameter
9342     *                         -1 = illegal identifier (Note 3)
9343     *                         -2 = illegal case (Note 3)
9344     *
9345     * <p>Notes:
9346     * <ol>
9347     *
9348     * <li> The identifier n is a number that specifies the choice of
9349     *     reference ellipsoid.  The following are supported:
9350     *
9351     *        n   ellipsoid
9352     *
9353     *        1    WGS84
9354     *        2    GRS80
9355     *
9356     *     The number n has no significance outside the JSOFA software.
9357     *
9358     * <li> The height (height, given) and the geocentric vector (xyz,
9359     *     returned) are in meters.
9360     *
9361     * <li> No validation is performed on the arguments elong, phi and
9362     *     height.  An error status -1 means that the identifier n is
9363     *     illegal.  An error status -2 protects against cases that would
9364     *     lead to arithmetic exceptions.  In all error cases, xyz is set
9365     *     to zeros.
9366     *
9367     * <li> The inverse transformation is performed in the function jauGc2gd.
9368     *</ol>
9369     *<p>Called:<ul>
9370     *     <li>{@link #jauEform} Earth reference ellipsoids
9371     *     <li>{@link #jauGd2gce} geodetic to geocentric transformation, general
9372     *     <li>{@link #jauZp} zero p-vector
9373     * </ul>
9374     *@version 2010 January 18
9375     *
9376     *  @since Release 20101201
9377     *
9378     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
9379     */
9380     public static double[] jauGd2gc ( int n, double elong, double phi, double height ) throws JSOFAIllegalParameter, JSOFAInternalError
9381     {
9382 
9383 
9384     /* Obtain reference ellipsoid parameters. */
9385        ReferenceEllipsoid em = jauEform ( n );
9386 
9387     /* If OK, transform longitude, geodetic latitude, height to x,y,z. */
9388       return jauGd2gce ( em.a, em.f, elong, phi, height );
9389   
9390     
9391     }
9392     
9393 
9394     /**
9395     *  Transform geodetic coordinates to geocentric for a reference
9396     *  ellipsoid of specified form.
9397     *
9398     *<p>This function is derived from the International Astronomical Union's
9399     *  JSOFA (Standards of Fundamental Astronomy) software collection.
9400     *
9401     *<p>Status:  support function.
9402     *
9403     *<!-- Given: -->
9404     *     @param a        double      equatorial radius (Notes 1,4)
9405     *     @param f        double      flattening (Notes 2,4)
9406     *     @param elong    double      longitude (radians, east +ve)
9407     *     @param phi      double      latitude (geodetic, radians, Note 4)
9408     *     @param height   double      height above ellipsoid (geodetic, Notes 3,4)
9409     *
9410     *<!-- Returned: -->
9411     *     @return xyz      double[3]    <u>returned</u> geocentric vector (Note 3)
9412     *
9413     * <!-- Returned (function value): -->
9414     *  @throws JSOFAInternalError
9415     *                            0 = OK
9416     *                           -1 = illegal case (Note 4)
9417     * <p>Notes:
9418     * <ol>
9419     *
9420     * <li> The equatorial radius, a, can be in any units, but meters is
9421     *     the conventional choice.
9422     *
9423     * <li> The flattening, f, is (for the Earth) a value around 0.00335,
9424     *     i.e. around 1/298.
9425     *
9426     * <li> The equatorial radius, a, and the height, height, must be
9427     *     given in the same units, and determine the units of the
9428     *     returned geocentric vector, xyz.
9429     *
9430     * <li> No validation is performed on individual arguments.  The error
9431     *     status -1 protects against (unrealistic) cases that would lead
9432     *     to arithmetic exceptions.  If an error occurs, xyz is unchanged.
9433     *
9434     * <li> The inverse transformation is performed in the function
9435     *     jauGc2gde.
9436     *
9437     * <li> The transformation for a standard ellipsoid (such as WGS84) can
9438     *     more conveniently be performed by calling jauGd2gc,  which uses a
9439     *     numerical code (1 for WGS84) to identify the required a and f
9440     *     values.
9441     *</ol>
9442     *<p>References:
9443     *
9444     *     <p>Green, R.M., Spherical Astronomy, Cambridge University Press,
9445     *     (1985) Section 4.5, p96.
9446     *
9447     *     <p>Explanatory Supplement to the Astronomical Almanac,
9448     *     P. Kenneth Seidelmann (ed), University Science Books (1992),
9449     *     Section 4.22, p202.
9450     *
9451     *@version 2009 November 2
9452     *
9453     *  @since Release 20101201
9454     *
9455     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
9456     */
9457     public static double[] jauGd2gce ( double a, double f, double elong, double phi,
9458                     double height ) throws JSOFAInternalError
9459     {
9460        double sp, cp, w, d, ac, as, r;
9461        double xyz[] = new double[3];
9462 
9463 
9464     /* Functions of geodetic latitude. */
9465        sp = sin(phi);
9466        cp = cos(phi);
9467        w = 1.0 - f;
9468        w = w * w;
9469        d = cp*cp + w*sp*sp;
9470        if ( d <= 0.0 ) throw new JSOFAInternalError("illegal combination of arguments d< 0", -1);
9471        ac = a / sqrt(d);
9472        as = w * ac;
9473 
9474     /* Geocentric vector. */
9475        r = (ac + height) * cp;
9476        xyz[0] = r * cos(elong);
9477        xyz[1] = r * sin(elong);
9478        xyz[2] = (as + height) * sp;
9479 
9480     /* Success. */
9481        return xyz;
9482 
9483     
9484     }
9485     
9486 
9487     /**
9488     *  Greenwich mean sidereal time (model consistent with IAU 2000
9489     *  resolutions).
9490     *
9491     *<p>This function is derived from the International Astronomical Union's
9492     *  SOFA (Standards Of Fundamental Astronomy) software collection.
9493     *
9494     *<p>Status:  canonical model.
9495     *
9496     *<!-- Given: -->
9497     *     @param uta double     UT1 as a 2-part Julian Date (Notes 1,2)
9498     *     @param utb double     UT1 as a 2-part Julian Date (Notes 1,2) 
9499     *     @param tta double     TT as a 2-part Julian Date (Notes 1,2)
9500     *     @param ttb double     TT as a 2-part Julian Date (Notes 1,2) 
9501     *
9502     * <!-- Returned (function value): -->
9503     *  @return double    Greenwich mean sidereal time (radians)
9504     *
9505     * <p>Notes:
9506     * <ol>
9507     *
9508     * <li> The UT1 and TT dates uta+utb and tta+ttb respectively, are both
9509     *     Julian Dates, apportioned in any convenient way between the
9510     *     argument pairs.  For example, JD=2450123.7 could be expressed in
9511     *     any of these ways, among others:
9512     *<pre>
9513     *            Part A         Part B
9514     *
9515     *         2450123.7           0.0       (JD method)
9516     *         2451545.0       -1421.3       (J2000 method)
9517     *         2400000.5       50123.2       (MJD method)
9518     *         2450123.5           0.2       (date &amp; time method)
9519     *</pre>
9520     *     The JD method is the most natural and convenient to use in
9521     *     cases where the loss of several decimal digits of resolution
9522     *     is acceptable (in the case of UT;  the TT is not at all critical
9523     *     in this respect).  The J2000 and MJD methods are good compromises
9524     *     between resolution and convenience.  For UT, the date &amp; time
9525     *     method is best matched to the algorithm that is used by the Earth
9526     *     Rotation Angle function, called internally:  maximum precision is
9527     *     delivered when the uta argument is for 0hrs UT1 on the day in
9528     *     question and the utb argument lies in the range 0 to 1, or vice
9529     *     versa.
9530     *
9531     * <li> Both UT1 and TT are required, UT1 to predict the Earth rotation
9532     *     and TT to predict the effects of precession.  If UT1 is used for
9533     *     both purposes, errors of order 100 microarcseconds result.
9534     *
9535     * <li> This GMST is compatible with the IAU 2000 resolutions and must be
9536     *     used only in conjunction with other IAU 2000 compatible
9537     *     components such as precession-nutation and equation of the
9538     *     equinoxes.
9539     *
9540     * <li> The result is returned in the range 0 to 2pi.
9541     *
9542     * <li> The algorithm is from Capitaine et al. (2003) and IERS
9543     *     Conventions 2003.
9544     *</ol>
9545     *<p>Called:<ul>
9546     *     <li>{@link #jauEra00} Earth rotation angle, IAU 2000
9547     *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
9548     * </ul>
9549     *<p>References:
9550     *
9551     *    <p>Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
9552     *     implement the IAU 2000 definition of UT1", Astronomy &amp;
9553     *     Astrophysics, 406, 1135-1149 (2003)
9554     *
9555     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
9556     *     IERS Technical Note No. 32, BKG (2004)
9557     *
9558     *@version 2009 March 16
9559     *
9560     *  @since Release 20101201
9561     *
9562     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
9563     */
9564     public static double jauGmst00(double uta, double utb, double tta, double ttb)
9565     {
9566        double t, gmst;
9567 
9568 
9569     /* TT Julian centuries since J2000.0. */
9570        t = ((tta - DJ00) + ttb) / DJC;
9571 
9572     /* Greenwich Mean Sidereal Time, IAU 2000. */
9573        gmst = jauAnp(jauEra00(uta, utb) +
9574                        (     0.014506   +
9575                        (  4612.15739966 +
9576                        (     1.39667721 +
9577                        (    -0.00009344 +
9578                        (     0.00001882 )
9579               * t) * t) * t) * t) * DAS2R);
9580 
9581        return gmst;
9582 
9583         }
9584     
9585 
9586     /**
9587     *  Greenwich mean sidereal time (consistent with IAU 2006 precession).
9588     *
9589     *<p>This function is derived from the International Astronomical Union's
9590     *  SOFA (Standards Of Fundamental Astronomy) software collection.
9591     *
9592     *<p>Status:  canonical model.
9593     *
9594     *<!-- Given: -->
9595     *     @param uta double     UT1 as a 2-part Julian Date (Notes 1,2)
9596     *     @param utb double     UT1 as a 2-part Julian Date (Notes 1,2) 
9597     *     @param tta double     TT as a 2-part Julian Date (Notes 1,2)
9598     *     @param ttb double     TT as a 2-part Julian Date (Notes 1,2) 
9599     *
9600     * <!-- Returned (function value): -->
9601     *  @return double    Greenwich mean sidereal time (radians)
9602     *
9603     * <p>Notes:
9604     * <ol>
9605     *
9606     * <li> The UT1 and TT dates uta+utb and tta+ttb respectively, are both
9607     *     Julian Dates, apportioned in any convenient way between the
9608     *     argument pairs.  For example, JD=2450123.7 could be expressed in
9609     *     any of these ways, among others:
9610     *<pre>
9611     *            Part A        Part B
9612     *
9613     *         2450123.7           0.0       (JD method)
9614     *         2451545.0       -1421.3       (J2000 method)
9615     *         2400000.5       50123.2       (MJD method)
9616     *         2450123.5           0.2       (date &amp; time method)
9617     *</pre>
9618     *     The JD method is the most natural and convenient to use in
9619     *     cases where the loss of several decimal digits of resolution
9620     *     is acceptable (in the case of UT;  the TT is not at all critical
9621     *     in this respect).  The J2000 and MJD methods are good compromises
9622     *     between resolution and convenience.  For UT, the date &amp; time
9623     *     method is best matched to the algorithm that is used by the Earth
9624     *     rotation angle function, called internally:  maximum precision is
9625     *     delivered when the uta argument is for 0hrs UT1 on the day in
9626     *     question and the utb argument lies in the range 0 to 1, or vice
9627     *     versa.
9628     *
9629     * <li> Both UT1 and TT are required, UT1 to predict the Earth rotation
9630     *     and TT to predict the effects of precession.  If UT1 is used for
9631     *     both purposes, errors of order 100 microarcseconds result.
9632     *
9633     * <li> This GMST is compatible with the IAU 2006 precession and must not
9634     *     be used with other precession models.
9635     *
9636     * <li> The result is returned in the range 0 to 2pi.
9637     *</ol>
9638     *<p>Called:<ul>
9639     *     <li>{@link #jauEra00} Earth rotation angle, IAU 2000
9640     *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
9641     * </ul>
9642     *<p>Reference:
9643     *
9644     *    <p>Capitaine, N., Wallace, P.T. &amp; Chapront, J., 2005,
9645     *     Astron.Astrophys. 432, 355
9646     *
9647     *@version 2008 May 24
9648     *
9649     *  @since Release 20101201
9650     *
9651     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
9652     */
9653     public static double jauGmst06(double uta, double utb, double tta, double ttb)
9654     {
9655        double t, gmst;
9656 
9657 
9658     /* TT Julian centuries since J2000.0. */
9659        t = ((tta - DJ00) + ttb) / DJC;
9660 
9661     /* Greenwich mean sidereal time, IAU 2006. */
9662        gmst = jauAnp(jauEra00(uta, utb) +
9663                       (    0.014506     +
9664                       (  4612.156534    +
9665                       (     1.3915817   +
9666                       (    -0.00000044  +
9667                       (    -0.000029956 +
9668                       (    -0.0000000368 )
9669               * t) * t) * t) * t) * t) * DAS2R);
9670 
9671        return gmst;
9672 
9673         }
9674     
9675 
9676     /**
9677     *  Universal Time to Greenwich mean sidereal time (IAU 1982 model).
9678     *
9679     *<p>This function is derived from the International Astronomical Union's
9680     *  SOFA (Standards Of Fundamental Astronomy) software collection.
9681     *
9682     *<p>Status:  canonical model.
9683     *
9684     *<!-- Given: -->
9685     *     @param dj1 double     UT1 Julian Date (see note)
9686     *     @param dj2 double     UT1 Julian Date (see note) 
9687     *
9688     * <!-- Returned (function value): -->
9689     *  @return double    Greenwich mean sidereal time (radians)
9690     *
9691     * <p>Notes:
9692     * <ol>
9693     *
9694     * <li> The UT1 date dj1+dj2 is a Julian Date, apportioned in any
9695     *     convenient way between the arguments dj1 and dj2.  For example,
9696     *     JD(UT1)=2450123.7 could be expressed in any of these ways,
9697     *     among others:
9698     *<pre>
9699     *             dj1            dj2
9700     *
9701     *         2450123.7D0        0D0        (JD method)
9702     *          2451545D0      -1421.3D0     (J2000 method)
9703     *         2400000.5D0     50123.2D0     (MJD method)
9704     *         2450123.5D0       0.2D0       (date &amp; time method)
9705     *</pre>
9706     *     The JD method is the most natural and convenient to use in
9707     *     cases where the loss of several decimal digits of resolution
9708     *     is acceptable.  The J2000 and MJD methods are good compromises
9709     *     between resolution and convenience.  The date &amp; time method is
9710     *     best matched to the algorithm used:  maximum accuracy (or, at
9711     *     least, minimum noise) is delivered when the dj1 argument is for
9712     *     0hrs UT1 on the day in question and the dj2 argument lies in the
9713     *     range 0 to 1, or vice versa.
9714     *
9715     * <li> The algorithm is based on the IAU 1982 expression.  This is
9716     *     always described as giving the GMST at 0 hours UT1.  In fact, it
9717     *     gives the difference between the GMST and the UT, the steady
9718     *     4-minutes-per-day drawing-ahead of ST with respect to UT.  When
9719     *     whole days are ignored, the expression happens to equal the GMST
9720     *     at 0 hours UT1 each day.
9721     *
9722     * <li> In this function, the entire UT1 (the sum of the two arguments
9723     *     dj1 and dj2) is used directly as the argument for the standard
9724     *     formula, the constant term of which is adjusted by 12 hours to
9725     *     take account of the noon phasing of Julian Date.  The UT1 is then
9726     *     added, but omitting whole days to conserve accuracy.
9727     *</ol>
9728     *<p>Called:<ul>
9729     *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
9730     * </ul>
9731     *<p>References:
9732     *
9733     *     <p>Transactions of the International Astronomical Union,
9734     *     XVIII B, 67 (1983).
9735     *
9736     *     <p>Aoki et al., Astron. Astrophys. 105, 359-361 (1982).
9737     *
9738     *@version 2008 May 24
9739     *
9740     *  @since Release 20101201
9741     *
9742     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
9743     */
9744     public static double jauGmst82(double dj1, double dj2)
9745     {
9746     /* Coefficients of IAU 1982 GMST-UT1 model */
9747        double A = 24110.54841  -  DAYSEC / 2.0;
9748        double B = 8640184.812866;
9749        double C = 0.093104;
9750        double D =  -6.2e-6;
9751 
9752     /* Note: the first constant, A, has to be adjusted by 12 hours */
9753     /* because the UT1 is supplied as a Julian date, which begins  */
9754     /* at noon.                                                    */
9755 
9756        double d1, d2, t, f, gmst;
9757 
9758 
9759     /* Julian centuries since fundamental epoch. */
9760        if (dj1 < dj2) {
9761           d1 = dj1;
9762           d2 = dj2;
9763        } else {
9764           d1 = dj2;
9765           d2 = dj1;
9766        }
9767        t = (d1 + (d2 - DJ00)) / DJC;
9768 
9769     /* Fractional part of JD(UT1), in seconds. */
9770        f = DAYSEC * (fmod(d1, 1.0) + fmod(d2, 1.0));
9771 
9772     /* GMST at this UT1. */
9773        gmst = jauAnp(DS2R * ((A + (B + (C + D * t) * t) * t) + f));
9774 
9775        return gmst;
9776 
9777         }
9778     
9779 
9780     /**
9781     *  Greenwich apparent sidereal time (consistent with IAU 2000
9782     *  resolutions).
9783     *
9784     *<p>This function is derived from the International Astronomical Union's
9785     *  SOFA (Standards Of Fundamental Astronomy) software collection.
9786     *
9787     *<p>Status:  canonical model.
9788     *
9789     *<!-- Given: -->
9790     *     @param uta double     UT1 as a 2-part Julian Date (Notes 1,2)
9791     *     @param utb double     UT1 as a 2-part Julian Date (Notes 1,2) 
9792     *     @param tta double     TT as a 2-part Julian Date (Notes 1,2)
9793     *     @param ttb double     TT as a 2-part Julian Date (Notes 1,2) 
9794     *
9795     * <!-- Returned (function value): -->
9796     *  @return double    Greenwich apparent sidereal time (radians)
9797     *
9798     * <p>Notes:
9799     * <ol>
9800     *
9801     * <li> The UT1 and TT dates uta+utb and tta+ttb respectively, are both
9802     *     Julian Dates, apportioned in any convenient way between the
9803     *     argument pairs.  For example, JD=2450123.7 could be expressed in
9804     *     any of these ways, among others:
9805     *<pre>
9806     *            Part A        Part B
9807     *
9808     *         2450123.7           0.0       (JD method)
9809     *         2451545.0       -1421.3       (J2000 method)
9810     *         2400000.5       50123.2       (MJD method)
9811     *         2450123.5           0.2       (date &amp; time method)
9812     *</pre>
9813     *     The JD method is the most natural and convenient to use in
9814     *     cases where the loss of several decimal digits of resolution
9815     *     is acceptable (in the case of UT;  the TT is not at all critical
9816     *     in this respect).  The J2000 and MJD methods are good compromises
9817     *     between resolution and convenience.  For UT, the date &amp; time
9818     *     method is best matched to the algorithm that is used by the Earth
9819     *     Rotation Angle function, called internally:  maximum precision is
9820     *     delivered when the uta argument is for 0hrs UT1 on the day in
9821     *     question and the utb argument lies in the range 0 to 1, or vice
9822     *     versa.
9823     *
9824     * <li> Both UT1 and TT are required, UT1 to predict the Earth rotation
9825     *     and TT to predict the effects of precession-nutation.  If UT1 is
9826     *     used for both purposes, errors of order 100 microarcseconds
9827     *     result.
9828     *
9829     * <li> This GAST is compatible with the IAU 2000 resolutions and must be
9830     *     used only in conjunction with other IAU 2000 compatible
9831     *     components such as precession-nutation.
9832     *
9833     * <li> The result is returned in the range 0 to 2pi.
9834     *
9835     * <li> The algorithm is from Capitaine et al. (2003) and IERS
9836     *     Conventions 2003.
9837     *</ol>
9838     *<p>Called:<ul>
9839     *     <li>{@link #jauGmst00} Greenwich mean sidereal time, IAU 2000
9840     *     <li>{@link #jauEe00a} equation of the equinoxes, IAU 2000A
9841     *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
9842     * </ul>
9843     *<p>References:
9844     *
9845     *    <p>Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
9846     *     implement the IAU 2000 definition of UT1", Astronomy &amp;
9847     *     Astrophysics, 406, 1135-1149 (2003)
9848     *
9849     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
9850     *     IERS Technical Note No. 32, BKG (2004)
9851     *
9852     *@version 2008 May 16
9853     *
9854     *  @since Release 20101201
9855     *
9856     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
9857     */
9858     public static double jauGst00a(double uta, double utb, double tta, double ttb)
9859     {
9860        double gmst00, ee00a, gst;
9861 
9862 
9863        gmst00 = jauGmst00(uta, utb, tta, ttb);
9864        ee00a = jauEe00a(tta, ttb);
9865        gst = jauAnp(gmst00 + ee00a);
9866 
9867        return gst;
9868 
9869         }
9870     
9871 
9872     /**
9873     *  Greenwich apparent sidereal time (consistent with IAU 2000
9874     *  resolutions but using the truncated nutation model IAU 2000B).
9875     *
9876     *<p>This function is derived from the International Astronomical Union's
9877     *  SOFA (Standards Of Fundamental Astronomy) software collection.
9878     *
9879     *<p>Status:  support function.
9880     *
9881     *<!-- Given: -->
9882     *     @param uta double     UT1 as a 2-part Julian Date (Notes 1,2)
9883     *     @param utb double     UT1 as a 2-part Julian Date (Notes 1,2) 
9884     *
9885     * <!-- Returned (function value): -->
9886     *  @return double    Greenwich apparent sidereal time (radians)
9887     *
9888     * <p>Notes:
9889     * <ol>
9890     *
9891     * <li> The UT1 date uta+utb is a Julian Date, apportioned in any
9892     *     convenient way between the argument pair.  For example,
9893     *     JD=2450123.7 could be expressed in any of these ways, among
9894     *     others:
9895     *<pre>
9896     *             uta            utb
9897     *
9898     *         2450123.7           0.0       (JD method)
9899     *         2451545.0       -1421.3       (J2000 method)
9900     *         2400000.5       50123.2       (MJD method)
9901     *         2450123.5           0.2       (date &amp; time method)
9902     *</pre>
9903     *     The JD method is the most natural and convenient to use in cases
9904     *     where the loss of several decimal digits of resolution is
9905     *     acceptable.  The J2000 and MJD methods are good compromises
9906     *     between resolution and convenience.  For UT, the date &amp; time
9907     *     method is best matched to the algorithm that is used by the Earth
9908     *     Rotation Angle function, called internally:  maximum precision is
9909     *     delivered when the uta argument is for 0hrs UT1 on the day in
9910     *     question and the utb argument lies in the range 0 to 1, or vice
9911     *     versa.
9912     *
9913     * <li> The result is compatible with the IAU 2000 resolutions, except
9914     *     that accuracy has been compromised for the sake of speed and
9915     *     convenience in two respects:
9916     *
9917     *     . UT is used instead of TDB (or TT) to compute the precession
9918     *       component of GMST and the equation of the equinoxes.  This
9919     *       results in errors of order 0.1 mas at present.
9920     *
9921     *     . The IAU 2000B abridged nutation model (McCarthy &amp; Luzum, 2001)
9922     *       is used, introducing errors of up to 1 mas.
9923     *
9924     * <li> This GAST is compatible with the IAU 2000 resolutions and must be
9925     *     used only in conjunction with other IAU 2000 compatible
9926     *     components such as precession-nutation.
9927     *
9928     * <li> The result is returned in the range 0 to 2pi.
9929     *
9930     * <li> The algorithm is from Capitaine et al. (2003) and IERS
9931     *     Conventions 2003.
9932     *</ol>
9933     *<p>Called:<ul>
9934     *     <li>{@link #jauGmst00} Greenwich mean sidereal time, IAU 2000
9935     *     <li>{@link #jauEe00b} equation of the equinoxes, IAU 2000B
9936     *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
9937     * </ul>
9938     *<p>References:
9939     *
9940     *    <p>Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
9941     *     implement the IAU 2000 definition of UT1", Astronomy &amp;
9942     *     Astrophysics, 406, 1135-1149 (2003)
9943     *
9944     *     <p>McCarthy, D.D. &amp; Luzum, B.J., "An abridged model of the
9945     *     precession-nutation of the celestial pole", Celestial Mechanics &amp;
9946     *     Dynamical Astronomy, 85, 37-49 (2003)
9947     *
9948     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
9949     *     IERS Technical Note No. 32, BKG (2004)
9950     *
9951     *@version 2008 May 16
9952     *
9953     *  @since Release 20101201
9954     *
9955     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
9956     */
9957     public static double jauGst00b(double uta, double utb)
9958     {
9959        double gmst00, ee00b, gst;
9960 
9961 
9962        gmst00 = jauGmst00(uta, utb, uta, utb);
9963        ee00b = jauEe00b(uta, utb);
9964        gst = jauAnp(gmst00 + ee00b);
9965 
9966        return gst;
9967 
9968         }
9969     
9970 
9971     /**
9972     *  Greenwich apparent sidereal time, IAU 2006, given the NPB matrix.
9973     *
9974     *<p>This function is derived from the International Astronomical Union's
9975     *  SOFA (Standards Of Fundamental Astronomy) software collection.
9976     *
9977     *<p>Status:  support function.
9978     *
9979     *<!-- Given: -->
9980     *     @param uta double         UT1 as a 2-part Julian Date (Notes 1,2)
9981     *     @param utb double         UT1 as a 2-part Julian Date (Notes 1,2) 
9982     *     @param tta double         TT as a 2-part Julian Date (Notes 1,2)
9983     *     @param ttb double         TT as a 2-part Julian Date (Notes 1,2) 
9984     *     @param rnpb      double[3][3]   nutation x precession x bias matrix
9985     *
9986     * <!-- Returned (function value): -->
9987     *  @return double        Greenwich apparent sidereal time (radians)
9988     *
9989     * <p>Notes:
9990     * <ol>
9991     *
9992     * <li> The UT1 and TT dates uta+utb and tta+ttb respectively, are both
9993     *     Julian Dates, apportioned in any convenient way between the
9994     *     argument pairs.  For example, JD=2450123.7 could be expressed in
9995     *     any of these ways, among others:
9996     *<pre>
9997     *            Part A        Part B
9998     *
9999     *         2450123.7           0.0       (JD method)
10000     *         2451545.0       -1421.3       (J2000 method)
10001     *         2400000.5       50123.2       (MJD method)
10002     *         2450123.5           0.2       (date &amp; time method)
10003     *</pre>
10004     *     The JD method is the most natural and convenient to use in
10005     *     cases where the loss of several decimal digits of resolution
10006     *     is acceptable (in the case of UT;  the TT is not at all critical
10007     *     in this respect).  The J2000 and MJD methods are good compromises
10008     *     between resolution and convenience.  For UT, the date &amp; time
10009     *     method is best matched to the algorithm that is used by the Earth
10010     *     rotation angle function, called internally:  maximum precision is
10011     *     delivered when the uta argument is for 0hrs UT1 on the day in
10012     *     question and the utb argument lies in the range 0 to 1, or vice
10013     *     versa.
10014     *
10015     * <li> Both UT1 and TT are required, UT1 to predict the Earth rotation
10016     *     and TT to predict the effects of precession-nutation.  If UT1 is
10017     *     used for both purposes, errors of order 100 microarcseconds
10018     *     result.
10019     *
10020     * <li> Although the function uses the IAU 2006 series for s+XY/2, it is
10021     *     otherwise independent of the precession-nutation model and can in
10022     *     practice be used with any equinox-based NPB matrix.
10023     *
10024     * <li> The result is returned in the range 0 to 2pi.
10025     *</ol>
10026     *<p>Called:<ul>
10027     *     <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
10028     *     <li>{@link #jauS06} the CIO locator s, given X,Y, IAU 2006
10029     *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
10030     *     <li>{@link #jauEra00} Earth rotation angle, IAU 2000
10031     *     <li>{@link #jauEors} equation of the origins, given NPB matrix and s
10032     * </ul>
10033     *<p>Reference:
10034     *
10035     *    <p>Wallace, P.T. &amp; Capitaine, N., 2006, Astron.Astrophys. 459, 981
10036     *
10037     *@version 2008 May 24
10038     *
10039     *  @since Release 20101201
10040     *
10041     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
10042     */
10043     public static double jauGst06(double uta, double utb, double tta, double ttb,
10044                     double rnpb[][])
10045     {
10046        double s, era, eors, gst;
10047 
10048 
10049     /* Extract CIP coordinates. */
10050        CelestialIntermediatePole cip = jauBpn2xy(rnpb);
10051 
10052     /* The CIO locator, s. */
10053        s = jauS06(tta, ttb, cip.x, cip.y);
10054 
10055     /* Greenwich apparent sidereal time. */
10056        era = jauEra00(uta, utb);
10057        eors = jauEors(rnpb, s);
10058        gst = jauAnp(era - eors);
10059 
10060        return gst;
10061 
10062         }
10063     
10064 
10065     /**
10066     *  Greenwich apparent sidereal time (consistent with IAU 2000 and 2006
10067     *  resolutions).
10068     *
10069     *<p>This function is derived from the International Astronomical Union's
10070     *  SOFA (Standards Of Fundamental Astronomy) software collection.
10071     *
10072     *<p>Status:  canonical model.
10073     *
10074     *<!-- Given: -->
10075     *     @param uta double     UT1 as a 2-part Julian Date (Notes 1,2)
10076     *     @param utb double     UT1 as a 2-part Julian Date (Notes 1,2) 
10077     *     @param tta double     TT as a 2-part Julian Date (Notes 1,2)
10078     *     @param ttb double     TT as a 2-part Julian Date (Notes 1,2) 
10079     *
10080     * <!-- Returned (function value): -->
10081     *  @return double    Greenwich apparent sidereal time (radians)
10082     *
10083     * <p>Notes:
10084     * <ol>
10085     *
10086     * <li> The UT1 and TT dates uta+utb and tta+ttb respectively, are both
10087     *     Julian Dates, apportioned in any convenient way between the
10088     *     argument pairs.  For example, JD=2450123.7 could be expressed in
10089     *     any of these ways, among others:
10090     *<pre>
10091     *            Part A        Part B
10092     *
10093     *         2450123.7           0.0       (JD method)
10094     *         2451545.0       -1421.3       (J2000 method)
10095     *         2400000.5       50123.2       (MJD method)
10096     *         2450123.5           0.2       (date &amp; time method)
10097     *</pre>
10098     *     The JD method is the most natural and convenient to use in
10099     *     cases where the loss of several decimal digits of resolution
10100     *     is acceptable (in the case of UT;  the TT is not at all critical
10101     *     in this respect).  The J2000 and MJD methods are good compromises
10102     *     between resolution and convenience.  For UT, the date &amp; time
10103     *     method is best matched to the algorithm that is used by the Earth
10104     *     rotation angle function, called internally:  maximum precision is
10105     *     delivered when the uta argument is for 0hrs UT1 on the day in
10106     *     question and the utb argument lies in the range 0 to 1, or vice
10107     *     versa.
10108     *
10109     * <li> Both UT1 and TT are required, UT1 to predict the Earth rotation
10110     *     and TT to predict the effects of precession-nutation.  If UT1 is
10111     *     used for both purposes, errors of order 100 microarcseconds
10112     *     result.
10113     *
10114     * <li> This GAST is compatible with the IAU 2000/2006 resolutions and
10115     *     must be used only in conjunction with IAU 2006 precession and
10116     *     IAU 2000A nutation.
10117     *
10118     * <li> The result is returned in the range 0 to 2pi.
10119     *</ol>
10120     *<p>Called:<ul>
10121     *     <li>{@link #jauPnm06a} classical NPB matrix, IAU 2006/2000A
10122     *     <li>{@link #jauGst06} Greenwich apparent ST, IAU 2006, given NPB matrix
10123     * </ul>
10124     *<p>Reference:
10125     *
10126     *    <p>Wallace, P.T. &amp; Capitaine, N., 2006, Astron.Astrophys. 459, 981
10127     *
10128     *@version 2008 May 16
10129     *
10130     *  @since Release 20101201
10131     *
10132     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
10133     */
10134     public static double jauGst06a(double uta, double utb, double tta, double ttb)
10135     {
10136        double rnpb[][] = new double[3][3], gst;
10137 
10138 
10139     /* Classical nutation x precession x bias matrix, IAU 2000A. */
10140        rnpb = jauPnm06a(tta, ttb);
10141 
10142     /* Greenwich apparent sidereal time. */
10143        gst = jauGst06(uta, utb, tta, ttb, rnpb);
10144 
10145        return gst;
10146 
10147         }
10148     
10149 
10150     /**
10151     *  Greenwich apparent sidereal time (consistent with IAU 1982/94
10152     *  resolutions).
10153     *
10154     *<p>This function is derived from the International Astronomical Union's
10155     *  SOFA (Standards Of Fundamental Astronomy) software collection.
10156     *
10157     *<p>Status:  support function.
10158     *
10159     *<!-- Given: -->
10160     *     @param uta double     UT1 as a 2-part Julian Date (Notes 1,2)
10161     *     @param utb double     UT1 as a 2-part Julian Date (Notes 1,2) 
10162     *
10163     * <!-- Returned (function value): -->
10164     *  @return double    Greenwich apparent sidereal time (radians)
10165     *
10166     * <p>Notes:
10167     * <ol>
10168     *
10169     * <li> The UT1 date uta+utb is a Julian Date, apportioned in any
10170     *     convenient way between the argument pair.  For example,
10171     *     JD=2450123.7 could be expressed in any of these ways, among
10172     *     others:
10173     *<pre>
10174     *             uta            utb
10175     *
10176     *         2450123.7           0.0       (JD method)
10177     *         2451545.0       -1421.3       (J2000 method)
10178     *         2400000.5       50123.2       (MJD method)
10179     *         2450123.5           0.2       (date &amp; time method)
10180     *</pre>
10181     *     The JD method is the most natural and convenient to use in cases
10182     *     where the loss of several decimal digits of resolution is
10183     *     acceptable.  The J2000 and MJD methods are good compromises
10184     *     between resolution and convenience.  For UT, the date &amp; time
10185     *     method is best matched to the algorithm that is used by the Earth
10186     *     Rotation Angle function, called internally:  maximum precision is
10187     *     delivered when the uta argument is for 0hrs UT1 on the day in
10188     *     question and the utb argument lies in the range 0 to 1, or vice
10189     *     versa.
10190     *
10191     * <li> The result is compatible with the IAU 1982 and 1994 resolutions,
10192     *     except that accuracy has been compromised for the sake of
10193     *     convenience in that UT is used instead of TDB (or TT) to compute
10194     *     the equation of the equinoxes.
10195     *
10196     * <li> This GAST must be used only in conjunction with contemporaneous
10197     *     IAU standards such as 1976 precession, 1980 obliquity and 1982
10198     *     nutation.  It is not compatible with the IAU 2000 resolutions.
10199     *
10200     * <li> The result is returned in the range 0 to 2pi.
10201     *</ol>
10202     *<p>Called:<ul>
10203     *     <li>{@link #jauGmst82} Greenwich mean sidereal time, IAU 1982
10204     *     <li>{@link #jauEqeq94} equation of the equinoxes, IAU 1994
10205     *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
10206     * </ul>
10207     *<p>References:
10208     *
10209     *     <p>Explanatory Supplement to the Astronomical Almanac,
10210     *     P. Kenneth Seidelmann (ed), University Science Books (1992)
10211     *
10212     *     IAU Resolution C7, Recommendation 3 (1994)
10213     *
10214     *@version 2008 May 16
10215     *
10216     *  @since Release 20101201
10217     *
10218     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
10219     */
10220     public static double jauGst94(double uta, double utb)
10221     {
10222        double gmst82, eqeq94, gst;
10223 
10224 
10225        gmst82 = jauGmst82(uta, utb);
10226        eqeq94 = jauEqeq94(uta, utb);
10227        gst = jauAnp(gmst82  + eqeq94);
10228 
10229        return gst;
10230 
10231         }
10232     
10233 
10234     /**
10235     *  Transform Hipparcos star data into the FK5 (J2000.0) system.
10236     *
10237     *<p>This function is derived from the International Astronomical Union's
10238     *  SOFA (Standards Of Fundamental Astronomy) software collection.
10239     *
10240     *<p>Status:  support function.
10241     *
10242     *  Given (all Hipparcos, epoch J2000.0):
10243     *     rh      double    RA (radians)
10244     *     dh      double    Dec (radians)
10245     *     drh     double    proper motion in RA (dRA/dt, rad/Jyear)
10246     *     ddh     double    proper motion in Dec (dDec/dt, rad/Jyear)
10247     *     pxh     double    parallax (arcsec)
10248     *     rvh     double    radial velocity (km/s, positive = receding)
10249     *
10250     *  Returned (all FK5, equinox J2000.0, epoch J2000.0):
10251     *     r5      double    RA (radians)
10252     *     d5      double    Dec (radians)
10253     *     dr5     double    proper motion in RA (dRA/dt, rad/Jyear)
10254     *     dd5     double    proper motion in Dec (dDec/dt, rad/Jyear)
10255     *     px5     double    parallax (arcsec)
10256     *     rv5     double    radial velocity (km/s, positive = receding)
10257     *
10258     * <p>Notes:
10259     * <ol>
10260     *
10261     * <li> This function transforms Hipparcos star positions and proper
10262     *     motions into FK5 J2000.0.
10263     *
10264     * <li> The proper motions in RA are dRA/dt rather than
10265     *     cos(Dec)*dRA/dt, and are per year rather than per century.
10266     *
10267     * <li> The FK5 to Hipparcos transformation is modeled as a pure
10268     *     rotation and spin;  zonal errors in the FK5 catalog are not
10269     *     taken into account.
10270     *
10271     * <li> See also jauFk52h, jauFk5hz, jauHfk5z.
10272     *</ol>
10273     *<p>Called:<ul>
10274     *     <li>{@link #jauStarpv} star catalog data to space motion pv-vector
10275     *     <li>{@link #jauFk5hip} FK5 to Hipparcos rotation and spin
10276     *     <li>{@link #jauRv2m} r-vector to r-matrix
10277     *     <li>{@link #jauRxp} product of r-matrix and p-vector
10278     *     <li>{@link #jauTrxp} product of transpose of r-matrix and p-vector
10279     *     <li>{@link #jauPxp} vector product of two p-vectors
10280     *     <li>{@link #jauPmp} p-vector minus p-vector
10281     *     <li>{@link #jauPvstar} space motion pv-vector to star catalog data
10282     * </ul>
10283     *<p>Reference:
10284     *
10285     *     <p>F.Mignard &amp; M.Froeschle, Astron. Astrophys. 354, 732-739 (2000).
10286     *
10287     *@version 2009 December 17
10288     *
10289     *  @since Release 20101201
10290     *
10291     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
10292     */
10293     public static CatalogCoords jauH2fk5(double rh, double dh,
10294                   double drh, double ddh, double pxh, double rvh)
10295     {
10296        int i;
10297        double pvh[][] = new double[2][3], r5h[][] = new double[3][3], s5h[] = new double[3], sh[] = new double[3], wxp[] = new double[3], vv[] = new double[3], pv5[][] = new double[2][3];
10298 
10299 
10300     /* Hipparcos barycentric position/velocity pv-vector (normalized). */
10301        jauStarpv(rh, dh, drh, ddh, pxh, rvh, pvh);
10302 
10303     /* FK5 to Hipparcos orientation matrix and spin vector. */
10304        jauFk5hip(r5h, s5h);
10305 
10306     /* Make spin units per day instead of per year. */
10307        for ( i = 0; i < 3; s5h[i++] /= 365.25 );
10308 
10309     /* Orient the spin into the Hipparcos system. */
10310        sh = jauRxp(r5h, s5h);
10311 
10312     /* De-orient the Hipparcos position into the FK5 system. */
10313        pv5[0] = jauTrxp(r5h, pvh[0]);
10314 
10315     /* Apply spin to the position giving an extra space motion component. */
10316        wxp = jauPxp(pvh[0],sh);
10317 
10318     /* Subtract this component from the Hipparcos space motion. */
10319        vv = jauPmp(pvh[1], wxp);
10320 
10321     /* De-orient the Hipparcos space motion into the FK5 system. */
10322        pv5[1] = jauTrxp(r5h, vv);
10323 
10324     /* FK5 pv-vector to spherical., r5, d5, dr5, dd5, px5, rv5 */
10325        CatalogCoords cat = null;
10326        try {
10327            cat = jauPvstar(pv5);
10328        } catch (JSOFAInternalError e) {
10329            // original code just ignored this possibility
10330            e.printStackTrace();
10331        }
10332 
10333        return cat;
10334 
10335         }
10336     
10337 
10338     /**
10339     *  Transform a Hipparcos star position into FK5 J2000.0, assuming
10340     *  zero Hipparcos proper motion.
10341     *
10342     *<p>This function is derived from the International Astronomical Union's
10343     *  SOFA (Standards Of Fundamental Astronomy) software collection.
10344     *
10345     *<p>Status:  support function.
10346     *
10347     *<!-- Given: -->
10348     *     @param rh             double     Hipparcos RA (radians)
10349     *     @param dh             double     Hipparcos Dec (radians)
10350     *     @param date1 double     TDB date (Note 1)
10351     *     @param date2 double     TDB date (Note 1) 
10352     *
10353     * FIXME original did not return the parallax and radial velocity of the CatalogCoords type.
10354     *  Returned (all FK5, equinox J2000.0, date date1+date2):
10355     *     r5            double    RA (radians)
10356     *     d5            double    Dec (radians)
10357     *     dr5           double    FK5 RA proper motion (rad/year, Note 4)
10358     *     dd5           double    Dec proper motion (rad/year, Note 4)
10359     *
10360     * <p>Notes:
10361     * <ol>
10362     *
10363     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
10364     *     convenient way between the two arguments.  For example,
10365     *     JD(TT)=2450123.7 could be expressed in any of these ways,
10366     *     among others:
10367     *<pre>
10368     *            date1          date2
10369     *
10370     *         2450123.7           0.0       (JD method)
10371     *         2451545.0       -1421.3       (J2000 method)
10372     *         2400000.5       50123.2       (MJD method)
10373     *         2450123.5           0.2       (date &amp; time method)
10374     *</pre>
10375     *     The JD method is the most natural and convenient to use in
10376     *     cases where the loss of several decimal digits of resolution
10377     *     is acceptable.  The J2000 method is best matched to the way
10378     *     the argument is handled internally and will deliver the
10379     *     optimum resolution.  The MJD method and the date &amp; time methods
10380     *     are both good compromises between resolution and convenience.
10381     *
10382     * <li> The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt.
10383     *
10384     * <li> The FK5 to Hipparcos transformation is modeled as a pure rotation
10385     *     and spin;  zonal errors in the FK5 catalogue are not taken into
10386     *     account.
10387     *
10388     * <li> It was the intention that Hipparcos should be a close
10389     *     approximation to an inertial frame, so that distant objects have
10390     *     zero proper motion;  such objects have (in general) non-zero
10391     *     proper motion in FK5, and this function returns those fictitious
10392     *     proper motions.
10393     *
10394     * <li> The position returned by this function is in the FK5 J2000.0
10395     *     reference system but at date date1+date2.
10396     *
10397     * <li> See also jauFk52h, jauH2fk5, jauFk5zhz.
10398     *</ol>
10399     *<p>Called:<ul>
10400     *     <li>{@link #jauS2c} spherical coordinates to unit vector
10401     *     <li>{@link #jauFk5hip} FK5 to Hipparcos rotation and spin
10402     *     <li>{@link #jauRxp} product of r-matrix and p-vector
10403     *     <li>{@link #jauSxp} multiply p-vector by scalar
10404     *     <li>{@link #jauRxr} product of two r-matrices
10405     *     <li>{@link #jauTrxp} product of transpose of r-matrix and p-vector
10406     *     <li>{@link #jauPxp} vector product of two p-vectors
10407     *     <li>{@link #jauPv2s} pv-vector to spherical
10408     *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
10409     * </ul>
10410     *<p>Reference:
10411     *
10412     *     <p>F.Mignard &amp; M.Froeschle, 2000, Astron.Astrophys. 354, 732-739.
10413     *
10414     *@version 2009 December 17
10415     *
10416     *  @since Release 20101201
10417     *
10418     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
10419     *
10420     */
10421     public static CatalogCoords jauHfk5z(double rh, double dh, double date1, double date2)
10422     {
10423        double t, ph[] = new double[3], r5h[][] = new double[3][3], s5h[] = new double[3], sh[] = new double[3], vst[] = new double[3],
10424        rst[][] = new double[3][3], r5ht[][] = new double[3][3], pv5e[][] = new double[2][3], vv[] = new double[3];
10425 
10426 
10427     /* Time interval from fundamental epoch J2000.0 to given date (JY). */
10428        t = ((date1 - DJ00) + date2) / DJY;
10429 
10430     /* Hipparcos barycentric position vector (normalized). */
10431        ph = jauS2c(rh,dh);
10432 
10433     /* FK5 to Hipparcos orientation matrix and spin vector. */
10434        jauFk5hip(r5h, s5h);
10435 
10436     /* Rotate the spin into the Hipparcos system. */
10437        sh = jauRxp(r5h, s5h);
10438 
10439     /* Accumulated Hipparcos wrt FK5 spin over that interval. */
10440        vst = jauSxp(t,s5h);
10441 
10442     /* Express the accumulated spin as a rotation matrix. */
10443        rst = jauRv2m(vst);
10444 
10445     /* Rotation matrix:  accumulated spin, then FK5 to Hipparcos. */
10446        r5ht = jauRxr(r5h, rst);
10447 
10448     /* De-orient &amp; de-spin the Hipparcos position into FK5 J2000.0. */
10449        pv5e[0] = jauTrxp(r5ht, ph);
10450 
10451     /* Apply spin to the position giving a space motion. */
10452        vv = jauPxp(sh,ph);
10453 
10454     /* De-orient &amp; de-spin the Hipparcos space motion into FK5 J2000.0. */
10455        pv5e[1] = jauTrxp(r5ht, vv);
10456 
10457     /* FK5 position/velocity pv-vector to spherical. */
10458        SphericalPositionVelocity pvs = jauPv2s(pv5e);
10459        double r5 = jauAnp(pvs.pos.theta);
10460 
10461        return new CatalogCoords(r5, pvs.pos.phi, pvs.vel.theta, pvs.vel.phi, 0.0, 0.0);
10462 
10463         }
10464     
10465 
10466     /**
10467     *  Initialize an r-matrix to the identity matrix.
10468     *
10469     *<p>This function is derived from the International Astronomical Union's
10470     *  SOFA (Standards Of Fundamental Astronomy) software collection.
10471     *
10472     *<p>Status:  vector/matrix support function.
10473     *
10474     *<!-- Returned: -->
10475     *     @param r        double[3][3]      <u>returned</u> r-matrix
10476     *
10477     *<p>Called:<ul>
10478     *     <li>{@link #jauZr} zero r-matrix
10479     * </ul>
10480     *@version 2008 May 11
10481     *
10482     *  @since Release 20101201
10483     *
10484     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
10485     */
10486     public static void jauIr(double r[][])
10487     {
10488        jauZr(r);
10489        r[0][0] = 1.0;
10490        r[1][1] = 1.0;
10491        r[2][2] = 1.0;
10492 
10493        return;
10494 
10495         }
10496     
10497 
10498     /**
10499     *  Julian Date to Gregorian year, month, day, and fraction of a day.
10500     *
10501     *<p>This function is derived from the International Astronomical Union's
10502     *  SOFA (Standards Of Fundamental Astronomy) software collection.
10503     *
10504     *<p>Status:  support function.
10505     *
10506     *<!-- Given: -->
10507     *     @param dj1 double    Julian Date (Notes 1, 2)
10508     *     @param dj2 double    Julian Date (Notes 1, 2) 
10509     *
10510     *  Returned (arguments):
10511     *     iy        int      year
10512     *     im        int      month
10513     *     id        int      day
10514     *     fd        double   fraction of day
10515     *
10516     * <!-- Returned (function value): -->
10517     *  @return int      status:
10518     *                           0 = OK
10519     *                          -1 = unacceptable date (Note 3)
10520     *
10521     * <p>Notes:
10522     * <ol>
10523     *
10524     * <li> The earliest valid date is -68569.5 (-4900 March 1).  The
10525     *     largest value accepted is 10^9.
10526     *
10527     * <li> The Julian Date is apportioned in any convenient way between
10528     *     the arguments dj1 and dj2.  For example, JD=2450123.7 could
10529     *     be expressed in any of these ways, among others:
10530     *<pre>
10531     *            dj1             dj2
10532     *
10533     *         2450123.7           0.0       (JD method)
10534     *         2451545.0       -1421.3       (J2000 method)
10535     *         2400000.5       50123.2       (MJD method)
10536     *         2450123.5           0.2       (date &amp; time method)
10537     *</pre>
10538     * <li> In early eras the conversion is from the "proleptic Gregorian
10539     *     calendar";  no account is taken of the date(s) of adoption of
10540     *     the Gregorian calendar, nor is the AD/BC numbering convention
10541     *     observed.
10542     *</ol>
10543     *<p>Reference:
10544     *
10545     *     <p>Explanatory Supplement to the Astronomical Almanac,
10546     *     P. Kenneth Seidelmann (ed), University Science Books (1992),
10547     *     Section 12.92 (p604).
10548     *
10549     *@version 2008 May 26
10550     *
10551     *  @since Release 20101201
10552     *
10553     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
10554     */
10555     public static Calendar jauJd2cal(double dj1, double dj2) throws JSOFAIllegalParameter
10556     {
10557     /* Minimum and maximum allowed JD */
10558        final double djmin = -68569.5;
10559        final double djmax = 1e9;
10560 
10561        long jd, l, n, i, k;
10562        double dj, d1, d2, f1, f2, f, d;
10563 
10564 
10565     /* Verify date is acceptable. */
10566        dj = dj1 + dj2;
10567        if (dj < djmin || dj > djmax) throw new JSOFAIllegalParameter("input julian date out of range", -1);
10568 
10569     /* Copy the date, big then small, and re-align to midnight. */
10570        if (dj1 >= dj2) {
10571           d1 = dj1;
10572           d2 = dj2;
10573        } else {
10574           d1 = dj2;
10575           d2 = dj1;
10576        }
10577        d2 -= 0.5;
10578 
10579     /* Separate day and fraction. */
10580        f1 = fmod(d1, 1.0);
10581        f2 = fmod(d2, 1.0);
10582        f = fmod(f1 + f2, 1.0);
10583        if (f < 0.0) f += 1.0;
10584        d = floor(d1 - f1) + floor(d2 - f2) + floor(f1 + f2 - f);
10585        jd = (long) floor(d) + 1L;
10586 
10587     /* Express day in Gregorian calendar. */
10588        l = jd + 68569L;
10589        n = (4L * l) / 146097L;
10590        l -= (146097L * n + 3L) / 4L;
10591        i = (4000L * (l + 1L)) / 1461001L;
10592        l -= (1461L * i) / 4L - 31L;
10593        k = (80L * l) / 2447L;
10594        int id = (int) (l - (2447L * k) / 80L);
10595        l = k / 11L;
10596        int im = (int) (k + 2L - 12L * l);
10597        int iy = (int) (100L * (n - 49L) + i + l);
10598       
10599 
10600        return new Calendar(iy, im, id, f);
10601 
10602         }
10603      
10604     /**
10605     *  Julian Date to Gregorian Calendar, expressed in a form convenient
10606     *  for formatting messages:  rounded to a specified precision.
10607     *
10608     *<p>This function is derived from the International Astronomical Union's
10609     *  SOFA (Standards Of Fundamental Astronomy) software collection.
10610     *
10611     *<p>Status:  support function.
10612     *
10613     *<!-- Given: -->
10614     *     @param ndp        int       number of decimal places of days in fraction
10615     *     @param dj1 double    dj1+dj2 = Julian Date (Note 1)
10616     *     @param dj2 double    dj1+dj2 = Julian Date (Note 1) 
10617     *
10618     *<!-- Returned: -->
10619     *     @param iymdf      int[4]     <u>returned</u> year, month, day, fraction in Gregorian calendar
10620     *
10621     *
10622     * <!-- Returned (function value): -->
10623     *  @return int      status:
10624     *                          -1 = date out of range
10625     *                           0 = OK
10626     *                          +1 = NDP not 0-9 (interpreted as 0)
10627     *
10628     * <p>Notes:
10629     * <ol>
10630     *
10631     * <li> The Julian Date is apportioned in any convenient way between
10632     *     the arguments dj1 and dj2.  For example, JD=2450123.7 could
10633     *     be expressed in any of these ways, among others:
10634     *<pre>
10635     *             dj1            dj2
10636     *
10637     *         2450123.7           0.0       (JD method)
10638     *         2451545.0       -1421.3       (J2000 method)
10639     *         2400000.5       50123.2       (MJD method)
10640     *         2450123.5           0.2       (date &amp; time method)
10641     *</pre>
10642     * <li> In early eras the conversion is from the "Proleptic Gregorian
10643     *     Calendar";  no account is taken of the date(s) of adoption of
10644     *     the Gregorian Calendar, nor is the AD/BC numbering convention
10645     *     observed.
10646     *
10647     * <li> Refer to the function jauJd2cal.
10648     *
10649     * <li> NDP should be 4 or less if internal overflows are to be
10650     *     avoided on machines which use 16-bit integers.
10651     *</ol>
10652     *<p>Called:<ul>
10653     *     <li>{@link #jauJd2cal} JD to Gregorian calendar
10654     * </ul>
10655     *<p>Reference:
10656     *
10657     *     <p>Explanatory Supplement to the Astronomical Almanac,
10658     *     P. Kenneth Seidelmann (ed), University Science Books (1992),
10659     *     Section 12.92 (p604).
10660     *
10661     *@version 2008 October 28
10662     *
10663     *  @since Release 20101201
10664     *
10665     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
10666     */
10667     public static int jauJdcalf(int ndp, double dj1, double dj2, int iymdf[])
10668     {
10669        int j;
10670        double denom, d1, d2, f1, f2, f;
10671 
10672 
10673     /* Denominator of fraction (e.g. 100 for 2 decimal places). */
10674        if ((ndp >= 0) && (ndp <= 9)) {
10675           j = 0;
10676           denom = pow(10.0, ndp);
10677        } else {
10678           j = 1;
10679           denom = 1.0;
10680        }
10681 
10682     /* Copy the date, big then small, and realign to midnight. */
10683        if (dj1 >= dj2) {
10684           d1 = dj1;
10685           d2 = dj2;
10686        } else {
10687           d1 = dj2;
10688           d2 = dj1;
10689        }
10690        d2 -= 0.5;
10691 
10692     /* Separate days and fractions. */
10693        f1 = fmod(d1, 1.0);
10694        f2 = fmod(d2, 1.0);
10695        d1 = floor(d1 - f1);
10696        d2 = floor(d2 - f2);
10697 
10698     /* Round the total fraction to the specified number of places. */
10699        f = floor((f1 + f2) * denom) / denom;
10700 
10701     /* Re-assemble the rounded date and re-align to noon. */
10702        d2 += f + 0.5;
10703 
10704        /* Convert to Gregorian Calendar. */
10705        try {
10706            Calendar cal = jauJd2cal(d1, d2);
10707            iymdf[0] = cal.iy;
10708            iymdf[1] = cal.im;
10709            iymdf[2] = cal.id;
10710            iymdf[3] = (int) (cal.fd * denom);
10711        } catch (JSOFAIllegalParameter e) {
10712            j = -1;
10713        }
10714 
10715     /* Return the status. */
10716        return j;
10717 
10718         }
10719     
10720 
10721     /**
10722     *  Form the matrix of nutation for a given date, IAU 2000A model.
10723     *
10724     *<p>This function is derived from the International Astronomical Union's
10725     *  SOFA (Standards Of Fundamental Astronomy) software collection.
10726     *
10727     *<p>Status:  support function.
10728     *
10729     *<!-- Given: -->
10730     *     @param date1 double TT as a 2-part Julian Date (Note 1)
10731     *     @param date2 double TT as a 2-part Julian Date (Note 1)
10732     *
10733     *<!-- Returned: -->
10734     *     @return rmatn         double[3][3]      <u>returned</u> nutation matrix
10735     *
10736     * <p>Notes:
10737     * <ol>
10738     *
10739     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
10740     *     convenient way between the two arguments.  For example,
10741     *     JD(TT)=2450123.7 could be expressed in any of these ways,
10742     *     among others:
10743     *<pre>
10744     *            date1          date2
10745     *
10746     *         2450123.7           0.0       (JD method)
10747     *         2451545.0       -1421.3       (J2000 method)
10748     *         2400000.5       50123.2       (MJD method)
10749     *         2450123.5           0.2       (date &amp; time method)
10750     *</pre>
10751     *     The JD method is the most natural and convenient to use in
10752     *     cases where the loss of several decimal digits of resolution
10753     *     is acceptable.  The J2000 method is best matched to the way
10754     *     the argument is handled internally and will deliver the
10755     *     optimum resolution.  The MJD method and the date &amp; time methods
10756     *     are both good compromises between resolution and convenience.
10757     *
10758     * <li> The matrix operates in the sense V(true) = rmatn * V(mean), where
10759     *     the p-vector V(true) is with respect to the true equatorial triad
10760     *     of date and the p-vector V(mean) is with respect to the mean
10761     *     equatorial triad of date.
10762     *
10763     * <li> A faster, but slightly less accurate result (about 1 mas), can be
10764     *     obtained by using instead the jauNum00b function.
10765     *</ol>
10766     *<p>Called:<ul>
10767     *     <li>{@link #jauPn00a} bias/precession/nutation, IAU 2000A
10768     * </ul>
10769     *<p>Reference:
10770     *
10771     *     <p>Explanatory Supplement to the Astronomical Almanac,
10772     *     P. Kenneth Seidelmann (ed), University Science Books (1992),
10773     *     Section 3.222-3 (p114).
10774     *
10775     *@version 2008 May 12
10776     *
10777     *  @since Release 20101201
10778     *
10779     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
10780     */
10781     public static double[][] jauNum00a(double date1, double date2)
10782     {
10783 
10784     /* Obtain the required matrix (discarding other results). */
10785        PrecessionNutation pn = jauPn00a(date1, date2);
10786 
10787        return pn.rn ;
10788 
10789         }
10790     
10791 
10792     /**
10793     *  Form the matrix of nutation for a given date, IAU 2000B model.
10794     *
10795     *<p>This function is derived from the International Astronomical Union's
10796     *  SOFA (Standards Of Fundamental Astronomy) software collection.
10797     *
10798     *<p>Status:  support function.
10799     *
10800     *<!-- Given: -->
10801     *     @param date1 double TT as a 2-part Julian Date (Note 1)
10802     *     @param date2 double TT as a 2-part Julian Date (Note 1)
10803     *
10804     *<!-- Returned: -->
10805     *     @return rmatn         double[3][3]     <u>returned</u> nutation matrix
10806     *
10807     * <p>Notes:
10808     * <ol>
10809     *
10810     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
10811     *     convenient way between the two arguments.  For example,
10812     *     JD(TT)=2450123.7 could be expressed in any of these ways,
10813     *     among others:
10814     *<pre>
10815     *            date1          date2
10816     *
10817     *         2450123.7           0.0       (JD method)
10818     *         2451545.0       -1421.3       (J2000 method)
10819     *         2400000.5       50123.2       (MJD method)
10820     *         2450123.5           0.2       (date &amp; time method)
10821     *</pre>
10822     *     The JD method is the most natural and convenient to use in
10823     *     cases where the loss of several decimal digits of resolution
10824     *     is acceptable.  The J2000 method is best matched to the way
10825     *     the argument is handled internally and will deliver the
10826     *     optimum resolution.  The MJD method and the date &amp; time methods
10827     *     are both good compromises between resolution and convenience.
10828     *
10829     * <li> The matrix operates in the sense V(true) = rmatn * V(mean), where
10830     *     the p-vector V(true) is with respect to the true equatorial triad
10831     *     of date and the p-vector V(mean) is with respect to the mean
10832     *     equatorial triad of date.
10833     *
10834     * <li> The present function is faster, but slightly less accurate (about
10835     *     1 mas), than the jauNum00a function.
10836     *</ol>
10837     *<p>Called:<ul>
10838     *     <li>{@link #jauPn00b} bias/precession/nutation, IAU 2000B
10839     * </ul>
10840     *<p>Reference:
10841     *
10842     *     <p>Explanatory Supplement to the Astronomical Almanac,
10843     *     P. Kenneth Seidelmann (ed), University Science Books (1992),
10844     *     Section 3.222-3 (p114).
10845     *
10846     *@version 2008 May 12
10847     *
10848     *  @since Release 20101201
10849     *
10850     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
10851     */
10852     public static double[][] jauNum00b(double date1, double date2)
10853     {
10854 
10855     /* Obtain the required matrix (discarding other results). */
10856        PrecessionNutation pn = jauPn00b(date1, date2);
10857  
10858        return pn.rn;
10859 
10860     }
10861     
10862 
10863     /**
10864     *  Form the matrix of nutation for a given date, IAU 2006/2000A model.
10865     *
10866     *<p>This function is derived from the International Astronomical Union's
10867     *  SOFA (Standards Of Fundamental Astronomy) software collection.
10868     *
10869     *<p>Status:  support function.
10870     *
10871     *<!-- Given: -->
10872     *     @param date1 double TT as a 2-part Julian Date (Note 1)
10873     *     @param date2 double TT as a 2-part Julian Date (Note 1)
10874     *
10875     *<!-- Returned: -->
10876     *     @return rmatn          double[3][3]      <u>returned</u> nutation matrix
10877     *
10878     * <p>Notes:
10879     * <ol>
10880     *
10881     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
10882     *     convenient way between the two arguments.  For example,
10883     *     JD(TT)=2450123.7 could be expressed in any of these ways,
10884     *     among others:
10885     *<pre>
10886     *            date1          date2
10887     *
10888     *         2450123.7           0.0       (JD method)
10889     *         2451545.0       -1421.3       (J2000 method)
10890     *         2400000.5       50123.2       (MJD method)
10891     *         2450123.5           0.2       (date &amp; time method)
10892     *</pre>
10893     *     The JD method is the most natural and convenient to use in
10894     *     cases where the loss of several decimal digits of resolution
10895     *     is acceptable.  The J2000 method is best matched to the way
10896     *     the argument is handled internally and will deliver the
10897     *     optimum resolution.  The MJD method and the date &amp; time methods
10898     *     are both good compromises between resolution and convenience.
10899     *
10900     * <li> The matrix operates in the sense V(true) = rmatn * V(mean), where
10901     *     the p-vector V(true) is with respect to the true equatorial triad
10902     *     of date and the p-vector V(mean) is with respect to the mean
10903     *     equatorial triad of date.
10904     *</ol>
10905     *<p>Called:<ul>
10906     *     <li>{@link #jauObl06} mean obliquity, IAU 2006
10907     *     <li>{@link #jauNut06a} nutation, IAU 2006/2000A
10908     *     <li>{@link #jauNumat} form nutation matrix
10909     * </ul>
10910     *<p>Reference:
10911     *
10912     *     <p>Explanatory Supplement to the Astronomical Almanac,
10913     *     P. Kenneth Seidelmann (ed), University Science Books (1992),
10914     *     Section 3.222-3 (p114).
10915     *
10916     *@version 2008 May 12
10917     *
10918     *  @since Release 20101201
10919     *
10920     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
10921     */
10922     public static double[][] jauNum06a(double date1, double date2)
10923     {
10924        double eps, rmatn[][];
10925 
10926 
10927     /* Mean obliquity. */
10928        eps = jauObl06(date1, date2);
10929 
10930     /* Nutation components. */
10931        NutationTerms nut = jauNut06a(date1, date2);
10932 
10933     /* Nutation matrix. */
10934        rmatn = jauNumat(eps, nut.dpsi, nut.deps);
10935 
10936        return rmatn;
10937 
10938         }
10939     
10940 
10941     /**
10942     *  Form the matrix of nutation.
10943     *
10944     *<p>This function is derived from the International Astronomical Union's
10945     *  SOFA (Standards Of Fundamental Astronomy) software collection.
10946     *
10947     *<p>Status:  support function.
10948     *
10949     *<!-- Given: -->
10950     *     @param epsa         double          mean obliquity of date (Note 1)
10951     *     @param dpsi double          nutation (Note 2)
10952     *     @param deps double          nutation (Note 2) 
10953     *
10954     *<!-- Returned: -->
10955     *     @return rmatn        double[3][3]     <u>returned</u> nutation matrix (Note 3)
10956     *
10957     * <p>Notes:
10958     * <ol>
10959     *
10960     *
10961     * <li> The supplied mean obliquity epsa, must be consistent with the
10962     *     precession-nutation models from which dpsi and deps were obtained.
10963     *
10964     * <li> The caller is responsible for providing the nutation components;
10965     *     they are in longitude and obliquity, in radians and are with
10966     *     respect to the equinox and ecliptic of date.
10967     *
10968     * <li> The matrix operates in the sense V(true) = rmatn * V(mean),
10969     *     where the p-vector V(true) is with respect to the true
10970     *     equatorial triad of date and the p-vector V(mean) is with
10971     *     respect to the mean equatorial triad of date.
10972     *</ol>
10973     *<p>Called:<ul>
10974     *     <li>{@link #jauIr} initialize r-matrix to identity
10975     *     <li>{@link #jauRx} rotate around X-axis
10976     *     <li>{@link #jauRz} rotate around Z-axis
10977     * </ul>
10978     *<p>Reference:
10979     *
10980     *     <p>Explanatory Supplement to the Astronomical Almanac,
10981     *     P. Kenneth Seidelmann (ed), University Science Books (1992),
10982     *     Section 3.222-3 (p114).
10983     *
10984     *@version 2008 May 11
10985     *
10986     *  @since Release 20101201
10987     *
10988     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
10989     */
10990     public static double[][] jauNumat(double epsa, double dpsi, double deps)
10991     {
10992         double rmatn[][] = new double[3][3];
10993     /* Build the rotation matrix. */
10994        jauIr(rmatn);
10995        jauRx(epsa, rmatn);
10996        jauRz(-dpsi, rmatn);
10997        jauRx(-(epsa + deps), rmatn);
10998 
10999        return rmatn;
11000 
11001         }
11002     /**
11003      * Nutation Terms.
11004      *  .
11005      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 21 Nov 2011
11006      * @version $Revision$ $date$
11007      */
11008     public static class NutationTerms {
11009         /**  nutation component in longitude  */
11010         public double dpsi;
11011         /**  nutation component in obliquity */
11012         public double deps;
11013         public NutationTerms(double dpsi, double deps) {
11014             this.dpsi = dpsi;
11015             this.deps = deps;
11016         }
11017     }
11018     /**
11019     *  Nutation, IAU 2000A model (MHB2000 luni-solar and planetary nutation
11020     *  with free core nutation omitted).
11021     *
11022     *<p>This function is derived from the International Astronomical Union's
11023     *  SOFA (Standards Of Fundamental Astronomy) software collection.
11024     *
11025     *<p>Status:  canonical model.
11026     *
11027     *<!-- Given: -->
11028     *     @param date1 double TT as a 2-part Julian Date (Note 1)
11029     *     @param date2 double TT as a 2-part Julian Date (Note 1)
11030     *
11031     *<!-- Returned: -->
11032     *     @return    <u>returned</u> nutation, luni-solar + planetary (Note 2)
11033     *
11034     * <p>Notes:
11035     * <ol>
11036     *
11037     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
11038     *     convenient way between the two arguments.  For example,
11039     *     JD(TT)=2450123.7 could be expressed in any of these ways,
11040     *     among others:
11041     *<pre>
11042     *            date1          date2
11043     *
11044     *         2450123.7           0.0       (JD method)
11045     *         2451545.0       -1421.3       (J2000 method)
11046     *         2400000.5       50123.2       (MJD method)
11047     *         2450123.5           0.2       (date &amp; time method)
11048     *</pre>
11049     *     The JD method is the most natural and convenient to use in
11050     *     cases where the loss of several decimal digits of resolution
11051     *     is acceptable.  The J2000 method is best matched to the way
11052     *     the argument is handled internally and will deliver the
11053     *     optimum resolution.  The MJD method and the date &amp; time methods
11054     *     are both good compromises between resolution and convenience.
11055     *
11056     * <li> The nutation components in longitude and obliquity are in radians
11057     *     and with respect to the equinox and ecliptic of date.  The
11058     *     obliquity at J2000.0 is assumed to be the Lieske et al. (1977)
11059     *     value of 84381.448 arcsec.
11060     *
11061     *     Both the luni-solar and planetary nutations are included.  The
11062     *     latter are due to direct planetary nutations and the
11063     *     perturbations of the lunar and terrestrial orbits.
11064     *
11065     * <li> The function computes the MHB2000 nutation series with the
11066     *     associated corrections for planetary nutations.  It is an
11067     *     implementation of the nutation part of the IAU 2000A precession-
11068     *     nutation model, formally adopted by the IAU General Assembly in
11069     *     2000, namely MHB2000 (Mathews et al. 2002), but with the free
11070     *     core nutation (FCN - see Note 4) omitted.
11071     *
11072     * <li> The full MHB2000 model also contains contributions to the
11073     *     nutations in longitude and obliquity due to the free-excitation
11074     *     of the free-core-nutation during the period 1979-2000.  These FCN
11075     *     terms, which are time-dependent and unpredictable, are NOT
11076     *     included in the present function and, if required, must be
11077     *     independently computed.  With the FCN corrections included, the
11078     *     present function delivers a pole which is at current epochs
11079     *     accurate to a few hundred microarcseconds.  The omission of FCN
11080     *     introduces further errors of about that size.
11081     *
11082     * <li> The present function provides classical nutation.  The MHB2000
11083     *     algorithm, from which it is adapted, deals also with (i) the
11084     *     offsets between the GCRS and mean poles and (ii) the adjustments
11085     *     in longitude and obliquity due to the changed precession rates.
11086     *     These additional functions, namely frame bias and precession
11087     *     adjustments, are supported by the JSOFA functions jauBi00  and
11088     *     jauPr00.
11089     *
11090     * <li> The MHB2000 algorithm also provides "total" nutations, comprising
11091     *     the arithmetic sum of the frame bias, precession adjustments,
11092     *     luni-solar nutation and planetary nutation.  These total
11093     *     nutations can be used in combination with an existing IAU 1976
11094     *     precession implementation, such as jauPmat76,  to deliver GCRS-
11095     *     to-true predictions of sub-mas accuracy at current dates.
11096     *     However, there are three shortcomings in the MHB2000 model that
11097     *     must be taken into account if more accurate or definitive results
11098     *     are required (see Wallace 2002):
11099     *
11100     *       (i) The MHB2000 total nutations are simply arithmetic sums,
11101     *           yet in reality the various components are successive Euler
11102     *           rotations.  This slight lack of rigor leads to cross terms
11103     *           that exceed 1 mas after a century.  The rigorous procedure
11104     *           is to form the GCRS-to-true rotation matrix by applying the
11105     *           bias, precession and nutation in that order.
11106     *
11107     *      (ii) Although the precession adjustments are stated to be with
11108     *           respect to Lieske et al. (1977), the MHB2000 model does
11109     *           not specify which set of Euler angles are to be used and
11110     *           how the adjustments are to be applied.  The most literal
11111     *           and straightforward procedure is to adopt the 4-rotation
11112     *           epsilon_0, psi_A, omega_A, xi_A option, and to add DPSIPR
11113     *           to psi_A and DEPSPR to both omega_A and eps_A.
11114     *
11115     *     (iii) The MHB2000 model predates the determination by Chapront
11116     *           et al. (2002) of a 14.6 mas displacement between the
11117     *           J2000.0 mean equinox and the origin of the ICRS frame.  It
11118     *           should, however, be noted that neglecting this displacement
11119     *           when calculating star coordinates does not lead to a
11120     *           14.6 mas change in right ascension, only a small second-
11121     *           order distortion in the pattern of the precession-nutation
11122     *           effect.
11123     *
11124     *     For these reasons, the JSOFA functions do not generate the "total
11125     *     nutations" directly, though they can of course easily be
11126     *     generated by calling jauBi00, jauPr00 and the present function
11127     *     and adding the results.
11128     *
11129     * <li> The MHB2000 model contains 41 instances where the same frequency
11130     *     appears multiple times, of which 38 are duplicates and three are
11131     *     triplicates.  To keep the present code close to the original MHB
11132     *     algorithm, this small inefficiency has not been corrected.
11133     *</ol>
11134     *<p>Called:<ul>
11135     *     <li>{@link #jauFal03} mean anomaly of the Moon
11136     *     <li>{@link #jauFaf03} mean argument of the latitude of the Moon
11137     *     <li>{@link #jauFaom03} mean longitude of the Moon's ascending node
11138     *     <li>{@link #jauFame03} mean longitude of Mercury
11139     *     <li>{@link #jauFave03} mean longitude of Venus
11140     *     <li>{@link #jauFae03} mean longitude of Earth
11141     *     <li>{@link #jauFama03} mean longitude of Mars
11142     *     <li>{@link #jauFaju03} mean longitude of Jupiter
11143     *     <li>{@link #jauFasa03} mean longitude of Saturn
11144     *     <li>{@link #jauFaur03} mean longitude of Uranus
11145     *     <li>{@link #jauFapa03} general accumulated precession in longitude
11146     * </ul>
11147     *<p>References:
11148     *
11149     *     <p>Chapront, J., Chapront-Touze, M. &amp; Francou, G. 2002,
11150     *     Astron.Astrophys. 387, 700
11151     *
11152     *     <p>Lieske, J.H., Lederle, T., Fricke, W. &amp; Morando, B. 1977,
11153     *     Astron.Astrophys. 58, 1-16
11154     *
11155     *     <p>Mathews, P.M., Herring, T.A., Buffet, B.A. 2002, J.Geophys.Res.
11156     *     107, B4.  The MHB_2000 code itself was obtained on 9th September
11157     *     2002 from ftp//maia.usno.navy.mil/conv2000/chapter5/IAU2000A.
11158     *
11159     *     <p>Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
11160     *     Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
11161     *
11162     *     <p>Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
11163     *     Astron.Astrophys.Supp.Ser. 135, 111
11164     *
11165     *    <p>Wallace, P.T., "Software for Implementing the IAU 2000
11166     *     Resolutions", in IERS Workshop 5.1 (2002)
11167     *
11168     *@version 2009 December 17
11169     *
11170     *  @since Release 20101201
11171     *
11172     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
11173     */
11174     public static NutationTerms jauNut00a(double date1, double date2 )
11175     {
11176        int i;
11177        double t, el, elp, f, d, om, arg, dp, de, sarg, carg,
11178               al, af, ad, aom, alme, alve, alea, alma,
11179               alju, alsa, alur, alne, apa, dpsils, depsls,
11180               dpsipl, depspl;
11181 
11182     /* Units of 0.1 microarcsecond to radians */
11183        final double U2R = DAS2R / 1e7;
11184 
11185     /* ------------------------- */
11186     /* Luni-Solar nutation model */
11187     /* ------------------------- */
11188 
11189     /* The units for the sine and cosine coefficients are */
11190     /* 0.1 microarcsecond and the same per Julian century */
11191 
11192        final class NutationModel {
11193           int nl,nlp,nf,nd,nom; /* coefficients of l,l',F,D,Om */
11194           double sp,spt,cp;     /* longitude sin, t*sin, cos coefficients */
11195           double ce,cet,se;     /* obliquity cos, t*cos, sin coefficients */
11196           public NutationModel(int nl,int nlp,int nf,int nd, int nom,
11197           double sp,double spt,double cp,     
11198           double ce,double cet,double se ) {
11199            this.nl = nl;
11200            this.nlp = nlp;
11201            this.nf = nf;
11202            this.nd = nd;
11203            this.nom = nom;
11204            this.sp = sp;
11205            this.spt = spt;
11206            this.cp = cp;
11207            this.ce = ce;
11208            this.cet = cet;
11209            this.se = se;
11210         }
11211        }
11212        
11213        NutationModel xls[] = {
11214 
11215        /* 1- 10 */
11216           new NutationModel( 0, 0, 0, 0, 1,
11217              -172064161.0, -174666.0, 33386.0, 92052331.0, 9086.0, 15377.0),
11218           new NutationModel( 0, 0, 2,-2, 2,
11219                -13170906.0, -1675.0, -13696.0, 5730336.0, -3015.0, -4587.0),
11220           new NutationModel( 0, 0, 2, 0, 2,-2276413.0,-234.0,2796.0,978459.0,-485.0, 1374.0),
11221           new NutationModel( 0, 0, 0, 0, 2,2074554.0, 207.0, -698.0,-897492.0,470.0, -291.0),
11222           new NutationModel( 0, 1, 0, 0, 0,1475877.0,-3633.0,11817.0,73871.0,-184.0,-1924.0),
11223           new NutationModel( 0, 1, 2,-2, 2,-516821.0,1226.0, -524.0,224386.0,-677.0, -174.0),
11224           new NutationModel( 1, 0, 0, 0, 0, 711159.0,  73.0, -872.0,  -6750.0,  0.0,  358.0),
11225           new NutationModel( 0, 0, 2, 0, 1,-387298.0,-367.0,  380.0, 200728.0, 18.0,  318.0),
11226           new NutationModel( 1, 0, 2, 0, 2,-301461.0, -36.0,  816.0, 129025.0,-63.0,  367.0),
11227           new NutationModel( 0,-1, 2,-2, 2, 215829.0,-494.0,  111.0, -95929.0,299.0,  132.0),
11228 
11229        /* 11-20 */
11230           new NutationModel( 0, 0, 2,-2, 1, 128227.0, 137.0,  181.0, -68982.0, -9.0,   39.0),
11231           new NutationModel(-1, 0, 2, 0, 2, 123457.0,  11.0,   19.0, -53311.0, 32.0,   -4.0),
11232           new NutationModel(-1, 0, 0, 2, 0, 156994.0,  10.0, -168.0,  -1235.0,  0.0,   82.0),
11233           new NutationModel( 1, 0, 0, 0, 1,  63110.0,  63.0,   27.0, -33228.0,  0.0,   -9.0),
11234           new NutationModel(-1, 0, 0, 0, 1, -57976.0, -63.0, -189.0,  31429.0,  0.0,  -75.0),
11235           new NutationModel(-1, 0, 2, 2, 2, -59641.0, -11.0,  149.0,  25543.0,-11.0,   66.0),
11236           new NutationModel( 1, 0, 2, 0, 1, -51613.0, -42.0,  129.0,  26366.0,  0.0,   78.0),
11237           new NutationModel(-2, 0, 2, 0, 1,  45893.0,  50.0,   31.0, -24236.0,-10.0,   20.0),
11238           new NutationModel( 0, 0, 0, 2, 0,  63384.0,  11.0, -150.0,  -1220.0,  0.0,   29.0),
11239           new NutationModel( 0, 0, 2, 2, 2, -38571.0,  -1.0,  158.0,  16452.0,-11.0,   68.0),
11240 
11241        /* 21-30 */
11242           new NutationModel( 0,-2, 2,-2, 2,  32481.0,   0.0,    0.0, -13870.0,  0.0,    0.0),
11243           new NutationModel(-2, 0, 0, 2, 0, -47722.0,   0.0,  -18.0,    477.0,  0.0,  -25.0),
11244           new NutationModel( 2, 0, 2, 0, 2, -31046.0,  -1.0,  131.0,  13238.0,-11.0,   59.0),
11245           new NutationModel( 1, 0, 2,-2, 2,  28593.0,   0.0,   -1.0, -12338.0, 10.0,   -3.0),
11246           new NutationModel(-1, 0, 2, 0, 1,  20441.0,  21.0,   10.0, -10758.0,  0.0,   -3.0),
11247           new NutationModel( 2, 0, 0, 0, 0,  29243.0,   0.0,  -74.0,   -609.0,  0.0,   13.0),
11248           new NutationModel( 0, 0, 2, 0, 0,  25887.0,   0.0,  -66.0,   -550.0,  0.0,   11.0),
11249           new NutationModel( 0, 1, 0, 0, 1, -14053.0, -25.0,   79.0,   8551.0, -2.0,  -45.0),
11250           new NutationModel(-1, 0, 0, 2, 1,  15164.0,  10.0,   11.0,  -8001.0,  0.0,   -1.0),
11251           new NutationModel( 0, 2, 2,-2, 2, -15794.0,  72.0,  -16.0,   6850.0,-42.0,   -5.0),
11252 
11253        /* 31-40 */
11254           new NutationModel( 0, 0,-2, 2, 0,  21783.0,   0.0,   13.0,   -167.0,  0.0,   13.0),
11255           new NutationModel( 1, 0, 0,-2, 1, -12873.0, -10.0,  -37.0,   6953.0,  0.0,  -14.0),
11256           new NutationModel( 0,-1, 0, 0, 1, -12654.0,  11.0,   63.0,   6415.0,  0.0,   26.0),
11257           new NutationModel(-1, 0, 2, 2, 1, -10204.0,   0.0,   25.0,   5222.0,  0.0,   15.0),
11258           new NutationModel( 0, 2, 0, 0, 0,  16707.0, -85.0,  -10.0,    168.0, -1.0,   10.0),
11259           new NutationModel( 1, 0, 2, 2, 2,  -7691.0,   0.0,   44.0,   3268.0,  0.0,   19.0),
11260           new NutationModel(-2, 0, 2, 0, 0, -11024.0,   0.0,  -14.0,    104.0,  0.0,    2.0),
11261           new NutationModel( 0, 1, 2, 0, 2,   7566.0, -21.0,  -11.0,  -3250.0,  0.0,   -5.0),
11262           new NutationModel( 0, 0, 2, 2, 1,  -6637.0, -11.0,   25.0,   3353.0,  0.0,   14.0),
11263           new NutationModel( 0,-1, 2, 0, 2,  -7141.0,  21.0,    8.0,   3070.0,  0.0,    4.0),
11264 
11265        /* 41-50 */
11266           new NutationModel( 0, 0, 0, 2, 1,  -6302.0, -11.0,    2.0,   3272.0,  0.0,    4.0),
11267           new NutationModel( 1, 0, 2,-2, 1,   5800.0,  10.0,    2.0,  -3045.0,  0.0,   -1.0),
11268           new NutationModel( 2, 0, 2,-2, 2,   6443.0,   0.0,   -7.0,  -2768.0,  0.0,   -4.0),
11269           new NutationModel(-2, 0, 0, 2, 1,  -5774.0, -11.0,  -15.0,   3041.0,  0.0,   -5.0),
11270           new NutationModel( 2, 0, 2, 0, 1,  -5350.0,   0.0,   21.0,   2695.0,  0.0,   12.0),
11271           new NutationModel( 0,-1, 2,-2, 1,  -4752.0, -11.0,   -3.0,   2719.0,  0.0,   -3.0),
11272           new NutationModel( 0, 0, 0,-2, 1,  -4940.0, -11.0,  -21.0,   2720.0,  0.0,   -9.0),
11273           new NutationModel(-1,-1, 0, 2, 0,   7350.0,   0.0,   -8.0,    -51.0,  0.0,    4.0),
11274           new NutationModel( 2, 0, 0,-2, 1,   4065.0,   0.0,    6.0,  -2206.0,  0.0,    1.0),
11275           new NutationModel( 1, 0, 0, 2, 0,   6579.0,   0.0,  -24.0,   -199.0,  0.0,    2.0),
11276 
11277        /* 51-60 */
11278           new NutationModel( 0, 1, 2,-2, 1,   3579.0,   0.0,    5.0,  -1900.0,  0.0,    1.0),
11279           new NutationModel( 1,-1, 0, 0, 0,   4725.0,   0.0,   -6.0,    -41.0,  0.0,    3.0),
11280           new NutationModel(-2, 0, 2, 0, 2,  -3075.0,   0.0,   -2.0,   1313.0,  0.0,   -1.0),
11281           new NutationModel( 3, 0, 2, 0, 2,  -2904.0,   0.0,   15.0,   1233.0,  0.0,    7.0),
11282           new NutationModel( 0,-1, 0, 2, 0,   4348.0,   0.0,  -10.0,    -81.0,  0.0,    2.0),
11283           new NutationModel( 1,-1, 2, 0, 2,  -2878.0,   0.0,    8.0,   1232.0,  0.0,    4.0),
11284           new NutationModel( 0, 0, 0, 1, 0,  -4230.0,   0.0,    5.0,    -20.0,  0.0,   -2.0),
11285           new NutationModel(-1,-1, 2, 2, 2,  -2819.0,   0.0,    7.0,   1207.0,  0.0,    3.0),
11286           new NutationModel(-1, 0, 2, 0, 0,  -4056.0,   0.0,    5.0,     40.0,  0.0,   -2.0),
11287           new NutationModel( 0,-1, 2, 2, 2,  -2647.0,   0.0,   11.0,   1129.0,  0.0,    5.0),
11288 
11289        /* 61-70 */
11290           new NutationModel(-2, 0, 0, 0, 1,  -2294.0,   0.0,  -10.0,   1266.0,  0.0,   -4.0),
11291           new NutationModel( 1, 1, 2, 0, 2,   2481.0,   0.0,   -7.0,  -1062.0,  0.0,   -3.0),
11292           new NutationModel( 2, 0, 0, 0, 1,   2179.0,   0.0,   -2.0,  -1129.0,  0.0,   -2.0),
11293           new NutationModel(-1, 1, 0, 1, 0,   3276.0,   0.0,    1.0,     -9.0,  0.0,    0.0),
11294           new NutationModel( 1, 1, 0, 0, 0,  -3389.0,   0.0,    5.0,     35.0,  0.0,   -2.0),
11295           new NutationModel( 1, 0, 2, 0, 0,   3339.0,   0.0,  -13.0,   -107.0,  0.0,    1.0),
11296           new NutationModel(-1, 0, 2,-2, 1,  -1987.0,   0.0,   -6.0,   1073.0,  0.0,   -2.0),
11297           new NutationModel( 1, 0, 0, 0, 2,  -1981.0,   0.0,    0.0,    854.0,  0.0,    0.0),
11298           new NutationModel(-1, 0, 0, 1, 0,   4026.0,   0.0, -353.0,   -553.0,  0.0, -139.0),
11299           new NutationModel( 0, 0, 2, 1, 2,   1660.0,   0.0,   -5.0,   -710.0,  0.0,   -2.0),
11300 
11301        /* 71-80 */
11302           new NutationModel(-1, 0, 2, 4, 2,  -1521.0,   0.0,    9.0,    647.0,  0.0,    4.0),
11303           new NutationModel(-1, 1, 0, 1, 1,   1314.0,   0.0,    0.0,   -700.0,  0.0,    0.0),
11304           new NutationModel( 0,-2, 2,-2, 1,  -1283.0,   0.0,    0.0,    672.0,  0.0,    0.0),
11305           new NutationModel( 1, 0, 2, 2, 1,  -1331.0,   0.0,    8.0,    663.0,  0.0,    4.0),
11306           new NutationModel(-2, 0, 2, 2, 2,   1383.0,   0.0,   -2.0,   -594.0,  0.0,   -2.0),
11307           new NutationModel(-1, 0, 0, 0, 2,   1405.0,   0.0,    4.0,   -610.0,  0.0,    2.0),
11308           new NutationModel( 1, 1, 2,-2, 2,   1290.0,   0.0,    0.0,   -556.0,  0.0,    0.0),
11309           new NutationModel(-2, 0, 2, 4, 2,  -1214.0,   0.0,    5.0,    518.0,  0.0,    2.0),
11310           new NutationModel(-1, 0, 4, 0, 2,   1146.0,   0.0,   -3.0,   -490.0,  0.0,   -1.0),
11311           new NutationModel( 2, 0, 2,-2, 1,   1019.0,   0.0,   -1.0,   -527.0,  0.0,   -1.0),
11312 
11313        /* 81-90 */
11314           new NutationModel( 2, 0, 2, 2, 2,  -1100.0,   0.0,    9.0,    465.0,  0.0,    4.0),
11315           new NutationModel( 1, 0, 0, 2, 1,   -970.0,   0.0,    2.0,    496.0,  0.0,    1.0),
11316           new NutationModel( 3, 0, 0, 0, 0,   1575.0,   0.0,   -6.0,    -50.0,  0.0,    0.0),
11317           new NutationModel( 3, 0, 2,-2, 2,    934.0,   0.0,   -3.0,   -399.0,  0.0,   -1.0),
11318           new NutationModel( 0, 0, 4,-2, 2,    922.0,   0.0,   -1.0,   -395.0,  0.0,   -1.0),
11319           new NutationModel( 0, 1, 2, 0, 1,    815.0,   0.0,   -1.0,   -422.0,  0.0,   -1.0),
11320           new NutationModel( 0, 0,-2, 2, 1,    834.0,   0.0,    2.0,   -440.0,  0.0,    1.0),
11321           new NutationModel( 0, 0, 2,-2, 3,   1248.0,   0.0,    0.0,   -170.0,  0.0,    1.0),
11322           new NutationModel(-1, 0, 0, 4, 0,   1338.0,   0.0,   -5.0,    -39.0,  0.0,    0.0),
11323           new NutationModel( 2, 0,-2, 0, 1,    716.0,   0.0,   -2.0,   -389.0,  0.0,   -1.0),
11324 
11325        /* 91-100 */
11326           new NutationModel(-2, 0, 0, 4, 0,   1282.0,   0.0,   -3.0,    -23.0,  0.0,    1.0),
11327           new NutationModel(-1,-1, 0, 2, 1,    742.0,   0.0,    1.0,   -391.0,  0.0,    0.0),
11328           new NutationModel(-1, 0, 0, 1, 1,   1020.0,   0.0,  -25.0,   -495.0,  0.0,  -10.0),
11329           new NutationModel( 0, 1, 0, 0, 2,    715.0,   0.0,   -4.0,   -326.0,  0.0,    2.0),
11330           new NutationModel( 0, 0,-2, 0, 1,   -666.0,   0.0,   -3.0,    369.0,  0.0,   -1.0),
11331           new NutationModel( 0,-1, 2, 0, 1,   -667.0,   0.0,    1.0,    346.0,  0.0,    1.0),
11332           new NutationModel( 0, 0, 2,-1, 2,   -704.0,   0.0,    0.0,    304.0,  0.0,    0.0),
11333           new NutationModel( 0, 0, 2, 4, 2,   -694.0,   0.0,    5.0,    294.0,  0.0,    2.0),
11334           new NutationModel(-2,-1, 0, 2, 0,  -1014.0,   0.0,   -1.0,      4.0,  0.0,   -1.0),
11335           new NutationModel( 1, 1, 0,-2, 1,   -585.0,   0.0,   -2.0,    316.0,  0.0,   -1.0),
11336 
11337        /* 101-110 */
11338           new NutationModel(-1, 1, 0, 2, 0,   -949.0,   0.0,    1.0,      8.0,  0.0,   -1.0),
11339           new NutationModel(-1, 1, 0, 1, 2,   -595.0,   0.0,    0.0,    258.0,  0.0,    0.0),
11340           new NutationModel( 1,-1, 0, 0, 1,    528.0,   0.0,    0.0,   -279.0,  0.0,    0.0),
11341           new NutationModel( 1,-1, 2, 2, 2,   -590.0,   0.0,    4.0,    252.0,  0.0,    2.0),
11342           new NutationModel(-1, 1, 2, 2, 2,    570.0,   0.0,   -2.0,   -244.0,  0.0,   -1.0),
11343           new NutationModel( 3, 0, 2, 0, 1,   -502.0,   0.0,    3.0,    250.0,  0.0,    2.0),
11344           new NutationModel( 0, 1,-2, 2, 0,   -875.0,   0.0,    1.0,     29.0,  0.0,    0.0),
11345           new NutationModel(-1, 0, 0,-2, 1,   -492.0,   0.0,   -3.0,    275.0,  0.0,   -1.0),
11346           new NutationModel( 0, 1, 2, 2, 2,    535.0,   0.0,   -2.0,   -228.0,  0.0,   -1.0),
11347           new NutationModel(-1,-1, 2, 2, 1,   -467.0,   0.0,    1.0,    240.0,  0.0,    1.0),
11348 
11349        /* 111-120 */
11350           new NutationModel( 0,-1, 0, 0, 2,    591.0,   0.0,    0.0,   -253.0,  0.0,    0.0),
11351           new NutationModel( 1, 0, 2,-4, 1,   -453.0,   0.0,   -1.0,    244.0,  0.0,   -1.0),
11352           new NutationModel(-1, 0,-2, 2, 0,    766.0,   0.0,    1.0,      9.0,  0.0,    0.0),
11353           new NutationModel( 0,-1, 2, 2, 1,   -446.0,   0.0,    2.0,    225.0,  0.0,    1.0),
11354           new NutationModel( 2,-1, 2, 0, 2,   -488.0,   0.0,    2.0,    207.0,  0.0,    1.0),
11355           new NutationModel( 0, 0, 0, 2, 2,   -468.0,   0.0,    0.0,    201.0,  0.0,    0.0),
11356           new NutationModel( 1,-1, 2, 0, 1,   -421.0,   0.0,    1.0,    216.0,  0.0,    1.0),
11357           new NutationModel(-1, 1, 2, 0, 2,    463.0,   0.0,    0.0,   -200.0,  0.0,    0.0),
11358           new NutationModel( 0, 1, 0, 2, 0,   -673.0,   0.0,    2.0,     14.0,  0.0,    0.0),
11359           new NutationModel( 0,-1,-2, 2, 0,    658.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11360 
11361        /* 121-130 */
11362           new NutationModel( 0, 3, 2,-2, 2,   -438.0,   0.0,    0.0,    188.0,  0.0,    0.0),
11363           new NutationModel( 0, 0, 0, 1, 1,   -390.0,   0.0,    0.0,    205.0,  0.0,    0.0),
11364           new NutationModel(-1, 0, 2, 2, 0,    639.0, -11.0,   -2.0,    -19.0,  0.0,    0.0),
11365           new NutationModel( 2, 1, 2, 0, 2,    412.0,   0.0,   -2.0,   -176.0,  0.0,   -1.0),
11366           new NutationModel( 1, 1, 0, 0, 1,   -361.0,   0.0,    0.0,    189.0,  0.0,    0.0),
11367           new NutationModel( 1, 1, 2, 0, 1,    360.0,   0.0,   -1.0,   -185.0,  0.0,   -1.0),
11368           new NutationModel( 2, 0, 0, 2, 0,    588.0,   0.0,   -3.0,    -24.0,  0.0,    0.0),
11369           new NutationModel( 1, 0,-2, 2, 0,   -578.0,   0.0,    1.0,      5.0,  0.0,    0.0),
11370           new NutationModel(-1, 0, 0, 2, 2,   -396.0,   0.0,    0.0,    171.0,  0.0,    0.0),
11371           new NutationModel( 0, 1, 0, 1, 0,    565.0,   0.0,   -1.0,     -6.0,  0.0,    0.0),
11372 
11373        /* 131-140 */
11374           new NutationModel( 0, 1, 0,-2, 1,   -335.0,   0.0,   -1.0,    184.0,  0.0,   -1.0),
11375           new NutationModel(-1, 0, 2,-2, 2,    357.0,   0.0,    1.0,   -154.0,  0.0,    0.0),
11376           new NutationModel( 0, 0, 0,-1, 1,    321.0,   0.0,    1.0,   -174.0,  0.0,    0.0),
11377           new NutationModel(-1, 1, 0, 0, 1,   -301.0,   0.0,   -1.0,    162.0,  0.0,    0.0),
11378           new NutationModel( 1, 0, 2,-1, 2,   -334.0,   0.0,    0.0,    144.0,  0.0,    0.0),
11379           new NutationModel( 1,-1, 0, 2, 0,    493.0,   0.0,   -2.0,    -15.0,  0.0,    0.0),
11380           new NutationModel( 0, 0, 0, 4, 0,    494.0,   0.0,   -2.0,    -19.0,  0.0,    0.0),
11381           new NutationModel( 1, 0, 2, 1, 2,    337.0,   0.0,   -1.0,   -143.0,  0.0,   -1.0),
11382           new NutationModel( 0, 0, 2, 1, 1,    280.0,   0.0,   -1.0,   -144.0,  0.0,    0.0),
11383           new NutationModel( 1, 0, 0,-2, 2,    309.0,   0.0,    1.0,   -134.0,  0.0,    0.0),
11384 
11385        /* 141-150 */
11386           new NutationModel(-1, 0, 2, 4, 1,   -263.0,   0.0,    2.0,    131.0,  0.0,    1.0),
11387           new NutationModel( 1, 0,-2, 0, 1,    253.0,   0.0,    1.0,   -138.0,  0.0,    0.0),
11388           new NutationModel( 1, 1, 2,-2, 1,    245.0,   0.0,    0.0,   -128.0,  0.0,    0.0),
11389           new NutationModel( 0, 0, 2, 2, 0,    416.0,   0.0,   -2.0,    -17.0,  0.0,    0.0),
11390           new NutationModel(-1, 0, 2,-1, 1,   -229.0,   0.0,    0.0,    128.0,  0.0,    0.0),
11391           new NutationModel(-2, 0, 2, 2, 1,    231.0,   0.0,    0.0,   -120.0,  0.0,    0.0),
11392           new NutationModel( 4, 0, 2, 0, 2,   -259.0,   0.0,    2.0,    109.0,  0.0,    1.0),
11393           new NutationModel( 2,-1, 0, 0, 0,    375.0,   0.0,   -1.0,     -8.0,  0.0,    0.0),
11394           new NutationModel( 2, 1, 2,-2, 2,    252.0,   0.0,    0.0,   -108.0,  0.0,    0.0),
11395           new NutationModel( 0, 1, 2, 1, 2,   -245.0,   0.0,    1.0,    104.0,  0.0,    0.0),
11396 
11397        /* 151-160 */
11398           new NutationModel( 1, 0, 4,-2, 2,    243.0,   0.0,   -1.0,   -104.0,  0.0,    0.0),
11399           new NutationModel(-1,-1, 0, 0, 1,    208.0,   0.0,    1.0,   -112.0,  0.0,    0.0),
11400           new NutationModel( 0, 1, 0, 2, 1,    199.0,   0.0,    0.0,   -102.0,  0.0,    0.0),
11401           new NutationModel(-2, 0, 2, 4, 1,   -208.0,   0.0,    1.0,    105.0,  0.0,    0.0),
11402           new NutationModel( 2, 0, 2, 0, 0,    335.0,   0.0,   -2.0,    -14.0,  0.0,    0.0),
11403           new NutationModel( 1, 0, 0, 1, 0,   -325.0,   0.0,    1.0,      7.0,  0.0,    0.0),
11404           new NutationModel(-1, 0, 0, 4, 1,   -187.0,   0.0,    0.0,     96.0,  0.0,    0.0),
11405           new NutationModel(-1, 0, 4, 0, 1,    197.0,   0.0,   -1.0,   -100.0,  0.0,    0.0),
11406           new NutationModel( 2, 0, 2, 2, 1,   -192.0,   0.0,    2.0,     94.0,  0.0,    1.0),
11407           new NutationModel( 0, 0, 2,-3, 2,   -188.0,   0.0,    0.0,     83.0,  0.0,    0.0),
11408 
11409        /* 161-170 */
11410           new NutationModel(-1,-2, 0, 2, 0,    276.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11411           new NutationModel( 2, 1, 0, 0, 0,   -286.0,   0.0,    1.0,      6.0,  0.0,    0.0),
11412           new NutationModel( 0, 0, 4, 0, 2,    186.0,   0.0,   -1.0,    -79.0,  0.0,    0.0),
11413           new NutationModel( 0, 0, 0, 0, 3,   -219.0,   0.0,    0.0,     43.0,  0.0,    0.0),
11414           new NutationModel( 0, 3, 0, 0, 0,    276.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11415           new NutationModel( 0, 0, 2,-4, 1,   -153.0,   0.0,   -1.0,     84.0,  0.0,    0.0),
11416           new NutationModel( 0,-1, 0, 2, 1,   -156.0,   0.0,    0.0,     81.0,  0.0,    0.0),
11417           new NutationModel( 0, 0, 0, 4, 1,   -154.0,   0.0,    1.0,     78.0,  0.0,    0.0),
11418           new NutationModel(-1,-1, 2, 4, 2,   -174.0,   0.0,    1.0,     75.0,  0.0,    0.0),
11419           new NutationModel( 1, 0, 2, 4, 2,   -163.0,   0.0,    2.0,     69.0,  0.0,    1.0),
11420 
11421        /* 171-180 */
11422           new NutationModel(-2, 2, 0, 2, 0,   -228.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11423           new NutationModel(-2,-1, 2, 0, 1,     91.0,   0.0,   -4.0,    -54.0,  0.0,   -2.0),
11424           new NutationModel(-2, 0, 0, 2, 2,    175.0,   0.0,    0.0,    -75.0,  0.0,    0.0),
11425           new NutationModel(-1,-1, 2, 0, 2,   -159.0,   0.0,    0.0,     69.0,  0.0,    0.0),
11426           new NutationModel( 0, 0, 4,-2, 1,    141.0,   0.0,    0.0,    -72.0,  0.0,    0.0),
11427           new NutationModel( 3, 0, 2,-2, 1,    147.0,   0.0,    0.0,    -75.0,  0.0,    0.0),
11428           new NutationModel(-2,-1, 0, 2, 1,   -132.0,   0.0,    0.0,     69.0,  0.0,    0.0),
11429           new NutationModel( 1, 0, 0,-1, 1,    159.0,   0.0,  -28.0,    -54.0,  0.0,   11.0),
11430           new NutationModel( 0,-2, 0, 2, 0,    213.0,   0.0,    0.0,     -4.0,  0.0,    0.0),
11431           new NutationModel(-2, 0, 0, 4, 1,    123.0,   0.0,    0.0,    -64.0,  0.0,    0.0),
11432 
11433        /* 181-190 */
11434           new NutationModel(-3, 0, 0, 0, 1,   -118.0,   0.0,   -1.0,     66.0,  0.0,    0.0),
11435           new NutationModel( 1, 1, 2, 2, 2,    144.0,   0.0,   -1.0,    -61.0,  0.0,    0.0),
11436           new NutationModel( 0, 0, 2, 4, 1,   -121.0,   0.0,    1.0,     60.0,  0.0,    0.0),
11437           new NutationModel( 3, 0, 2, 2, 2,   -134.0,   0.0,    1.0,     56.0,  0.0,    1.0),
11438           new NutationModel(-1, 1, 2,-2, 1,   -105.0,   0.0,    0.0,     57.0,  0.0,    0.0),
11439           new NutationModel( 2, 0, 0,-4, 1,   -102.0,   0.0,    0.0,     56.0,  0.0,    0.0),
11440           new NutationModel( 0, 0, 0,-2, 2,    120.0,   0.0,    0.0,    -52.0,  0.0,    0.0),
11441           new NutationModel( 2, 0, 2,-4, 1,    101.0,   0.0,    0.0,    -54.0,  0.0,    0.0),
11442           new NutationModel(-1, 1, 0, 2, 1,   -113.0,   0.0,    0.0,     59.0,  0.0,    0.0),
11443           new NutationModel( 0, 0, 2,-1, 1,   -106.0,   0.0,    0.0,     61.0,  0.0,    0.0),
11444 
11445        /* 191-200 */
11446           new NutationModel( 0,-2, 2, 2, 2,   -129.0,   0.0,    1.0,     55.0,  0.0,    0.0),
11447           new NutationModel( 2, 0, 0, 2, 1,   -114.0,   0.0,    0.0,     57.0,  0.0,    0.0),
11448           new NutationModel( 4, 0, 2,-2, 2,    113.0,   0.0,   -1.0,    -49.0,  0.0,    0.0),
11449           new NutationModel( 2, 0, 0,-2, 2,   -102.0,   0.0,    0.0,     44.0,  0.0,    0.0),
11450           new NutationModel( 0, 2, 0, 0, 1,    -94.0,   0.0,    0.0,     51.0,  0.0,    0.0),
11451           new NutationModel( 1, 0, 0,-4, 1,   -100.0,   0.0,   -1.0,     56.0,  0.0,    0.0),
11452           new NutationModel( 0, 2, 2,-2, 1,     87.0,   0.0,    0.0,    -47.0,  0.0,    0.0),
11453           new NutationModel(-3, 0, 0, 4, 0,    161.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11454           new NutationModel(-1, 1, 2, 0, 1,     96.0,   0.0,    0.0,    -50.0,  0.0,    0.0),
11455           new NutationModel(-1,-1, 0, 4, 0,    151.0,   0.0,   -1.0,     -5.0,  0.0,    0.0),
11456 
11457        /* 201-210 */
11458           new NutationModel(-1,-2, 2, 2, 2,   -104.0,   0.0,    0.0,     44.0,  0.0,    0.0),
11459           new NutationModel(-2,-1, 2, 4, 2,   -110.0,   0.0,    0.0,     48.0,  0.0,    0.0),
11460           new NutationModel( 1,-1, 2, 2, 1,   -100.0,   0.0,    1.0,     50.0,  0.0,    0.0),
11461           new NutationModel(-2, 1, 0, 2, 0,     92.0,   0.0,   -5.0,     12.0,  0.0,   -2.0),
11462           new NutationModel(-2, 1, 2, 0, 1,     82.0,   0.0,    0.0,    -45.0,  0.0,    0.0),
11463           new NutationModel( 2, 1, 0,-2, 1,     82.0,   0.0,    0.0,    -45.0,  0.0,    0.0),
11464           new NutationModel(-3, 0, 2, 0, 1,    -78.0,   0.0,    0.0,     41.0,  0.0,    0.0),
11465           new NutationModel(-2, 0, 2,-2, 1,    -77.0,   0.0,    0.0,     43.0,  0.0,    0.0),
11466           new NutationModel(-1, 1, 0, 2, 2,      2.0,   0.0,    0.0,     54.0,  0.0,    0.0),
11467           new NutationModel( 0,-1, 2,-1, 2,     94.0,   0.0,    0.0,    -40.0,  0.0,    0.0),
11468 
11469        /* 211-220 */
11470           new NutationModel(-1, 0, 4,-2, 2,    -93.0,   0.0,    0.0,     40.0,  0.0,    0.0),
11471           new NutationModel( 0,-2, 2, 0, 2,    -83.0,   0.0,   10.0,     40.0,  0.0,   -2.0),
11472           new NutationModel(-1, 0, 2, 1, 2,     83.0,   0.0,    0.0,    -36.0,  0.0,    0.0),
11473           new NutationModel( 2, 0, 0, 0, 2,    -91.0,   0.0,    0.0,     39.0,  0.0,    0.0),
11474           new NutationModel( 0, 0, 2, 0, 3,    128.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11475           new NutationModel(-2, 0, 4, 0, 2,    -79.0,   0.0,    0.0,     34.0,  0.0,    0.0),
11476           new NutationModel(-1, 0,-2, 0, 1,    -83.0,   0.0,    0.0,     47.0,  0.0,    0.0),
11477           new NutationModel(-1, 1, 2, 2, 1,     84.0,   0.0,    0.0,    -44.0,  0.0,    0.0),
11478           new NutationModel( 3, 0, 0, 0, 1,     83.0,   0.0,    0.0,    -43.0,  0.0,    0.0),
11479           new NutationModel(-1, 0, 2, 3, 2,     91.0,   0.0,    0.0,    -39.0,  0.0,    0.0),
11480 
11481        /* 221-230 */
11482           new NutationModel( 2,-1, 2, 0, 1,    -77.0,   0.0,    0.0,     39.0,  0.0,    0.0),
11483           new NutationModel( 0, 1, 2, 2, 1,     84.0,   0.0,    0.0,    -43.0,  0.0,    0.0),
11484           new NutationModel( 0,-1, 2, 4, 2,    -92.0,   0.0,    1.0,     39.0,  0.0,    0.0),
11485           new NutationModel( 2,-1, 2, 2, 2,    -92.0,   0.0,    1.0,     39.0,  0.0,    0.0),
11486           new NutationModel( 0, 2,-2, 2, 0,    -94.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11487           new NutationModel(-1,-1, 2,-1, 1,     68.0,   0.0,    0.0,    -36.0,  0.0,    0.0),
11488           new NutationModel( 0,-2, 0, 0, 1,    -61.0,   0.0,    0.0,     32.0,  0.0,    0.0),
11489           new NutationModel( 1, 0, 2,-4, 2,     71.0,   0.0,    0.0,    -31.0,  0.0,    0.0),
11490           new NutationModel( 1,-1, 0,-2, 1,     62.0,   0.0,    0.0,    -34.0,  0.0,    0.0),
11491           new NutationModel(-1,-1, 2, 0, 1,    -63.0,   0.0,    0.0,     33.0,  0.0,    0.0),
11492 
11493        /* 231-240 */
11494           new NutationModel( 1,-1, 2,-2, 2,    -73.0,   0.0,    0.0,     32.0,  0.0,    0.0),
11495           new NutationModel(-2,-1, 0, 4, 0,    115.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11496           new NutationModel(-1, 0, 0, 3, 0,   -103.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11497           new NutationModel(-2,-1, 2, 2, 2,     63.0,   0.0,    0.0,    -28.0,  0.0,    0.0),
11498           new NutationModel( 0, 2, 2, 0, 2,     74.0,   0.0,    0.0,    -32.0,  0.0,    0.0),
11499           new NutationModel( 1, 1, 0, 2, 0,   -103.0,   0.0,   -3.0,      3.0,  0.0,   -1.0),
11500           new NutationModel( 2, 0, 2,-1, 2,    -69.0,   0.0,    0.0,     30.0,  0.0,    0.0),
11501           new NutationModel( 1, 0, 2, 1, 1,     57.0,   0.0,    0.0,    -29.0,  0.0,    0.0),
11502           new NutationModel( 4, 0, 0, 0, 0,     94.0,   0.0,    0.0,     -4.0,  0.0,    0.0),
11503           new NutationModel( 2, 1, 2, 0, 1,     64.0,   0.0,    0.0,    -33.0,  0.0,    0.0),
11504 
11505        /* 241-250 */
11506           new NutationModel( 3,-1, 2, 0, 2,    -63.0,   0.0,    0.0,     26.0,  0.0,    0.0),
11507           new NutationModel(-2, 2, 0, 2, 1,    -38.0,   0.0,    0.0,     20.0,  0.0,    0.0),
11508           new NutationModel( 1, 0, 2,-3, 1,    -43.0,   0.0,    0.0,     24.0,  0.0,    0.0),
11509           new NutationModel( 1, 1, 2,-4, 1,    -45.0,   0.0,    0.0,     23.0,  0.0,    0.0),
11510           new NutationModel(-1,-1, 2,-2, 1,     47.0,   0.0,    0.0,    -24.0,  0.0,    0.0),
11511           new NutationModel( 0,-1, 0,-1, 1,    -48.0,   0.0,    0.0,     25.0,  0.0,    0.0),
11512           new NutationModel( 0,-1, 0,-2, 1,     45.0,   0.0,    0.0,    -26.0,  0.0,    0.0),
11513           new NutationModel(-2, 0, 0, 0, 2,     56.0,   0.0,    0.0,    -25.0,  0.0,    0.0),
11514           new NutationModel(-2, 0,-2, 2, 0,     88.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11515           new NutationModel(-1, 0,-2, 4, 0,    -75.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11516 
11517        /* 251-260 */
11518           new NutationModel( 1,-2, 0, 0, 0,     85.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11519           new NutationModel( 0, 1, 0, 1, 1,     49.0,   0.0,    0.0,    -26.0,  0.0,    0.0),
11520           new NutationModel(-1, 2, 0, 2, 0,    -74.0,   0.0,   -3.0,     -1.0,  0.0,   -1.0),
11521           new NutationModel( 1,-1, 2,-2, 1,    -39.0,   0.0,    0.0,     21.0,  0.0,    0.0),
11522           new NutationModel( 1, 2, 2,-2, 2,     45.0,   0.0,    0.0,    -20.0,  0.0,    0.0),
11523           new NutationModel( 2,-1, 2,-2, 2,     51.0,   0.0,    0.0,    -22.0,  0.0,    0.0),
11524           new NutationModel( 1, 0, 2,-1, 1,    -40.0,   0.0,    0.0,     21.0,  0.0,    0.0),
11525           new NutationModel( 2, 1, 2,-2, 1,     41.0,   0.0,    0.0,    -21.0,  0.0,    0.0),
11526           new NutationModel(-2, 0, 0,-2, 1,    -42.0,   0.0,    0.0,     24.0,  0.0,    0.0),
11527           new NutationModel( 1,-2, 2, 0, 2,    -51.0,   0.0,    0.0,     22.0,  0.0,    0.0),
11528 
11529        /* 261-270 */
11530           new NutationModel( 0, 1, 2, 1, 1,    -42.0,   0.0,    0.0,     22.0,  0.0,    0.0),
11531           new NutationModel( 1, 0, 4,-2, 1,     39.0,   0.0,    0.0,    -21.0,  0.0,    0.0),
11532           new NutationModel(-2, 0, 4, 2, 2,     46.0,   0.0,    0.0,    -18.0,  0.0,    0.0),
11533           new NutationModel( 1, 1, 2, 1, 2,    -53.0,   0.0,    0.0,     22.0,  0.0,    0.0),
11534           new NutationModel( 1, 0, 0, 4, 0,     82.0,   0.0,    0.0,     -4.0,  0.0,    0.0),
11535           new NutationModel( 1, 0, 2, 2, 0,     81.0,   0.0,   -1.0,     -4.0,  0.0,    0.0),
11536           new NutationModel( 2, 0, 2, 1, 2,     47.0,   0.0,    0.0,    -19.0,  0.0,    0.0),
11537           new NutationModel( 3, 1, 2, 0, 2,     53.0,   0.0,    0.0,    -23.0,  0.0,    0.0),
11538           new NutationModel( 4, 0, 2, 0, 1,    -45.0,   0.0,    0.0,     22.0,  0.0,    0.0),
11539           new NutationModel(-2,-1, 2, 0, 0,    -44.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11540 
11541        /* 271-280 */
11542           new NutationModel( 0, 1,-2, 2, 1,    -33.0,   0.0,    0.0,     16.0,  0.0,    0.0),
11543           new NutationModel( 1, 0,-2, 1, 0,    -61.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11544           new NutationModel( 0,-1,-2, 2, 1,     28.0,   0.0,    0.0,    -15.0,  0.0,    0.0),
11545           new NutationModel( 2,-1, 0,-2, 1,    -38.0,   0.0,    0.0,     19.0,  0.0,    0.0),
11546           new NutationModel(-1, 0, 2,-1, 2,    -33.0,   0.0,    0.0,     21.0,  0.0,    0.0),
11547           new NutationModel( 1, 0, 2,-3, 2,    -60.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11548           new NutationModel( 0, 1, 2,-2, 3,     48.0,   0.0,    0.0,    -10.0,  0.0,    0.0),
11549           new NutationModel( 0, 0, 2,-3, 1,     27.0,   0.0,    0.0,    -14.0,  0.0,    0.0),
11550           new NutationModel(-1, 0,-2, 2, 1,     38.0,   0.0,    0.0,    -20.0,  0.0,    0.0),
11551           new NutationModel( 0, 0, 2,-4, 2,     31.0,   0.0,    0.0,    -13.0,  0.0,    0.0),
11552 
11553        /* 281-290 */
11554           new NutationModel(-2, 1, 0, 0, 1,    -29.0,   0.0,    0.0,     15.0,  0.0,    0.0),
11555           new NutationModel(-1, 0, 0,-1, 1,     28.0,   0.0,    0.0,    -15.0,  0.0,    0.0),
11556           new NutationModel( 2, 0, 2,-4, 2,    -32.0,   0.0,    0.0,     15.0,  0.0,    0.0),
11557           new NutationModel( 0, 0, 4,-4, 4,     45.0,   0.0,    0.0,     -8.0,  0.0,    0.0),
11558           new NutationModel( 0, 0, 4,-4, 2,    -44.0,   0.0,    0.0,     19.0,  0.0,    0.0),
11559           new NutationModel(-1,-2, 0, 2, 1,     28.0,   0.0,    0.0,    -15.0,  0.0,    0.0),
11560           new NutationModel(-2, 0, 0, 3, 0,    -51.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11561           new NutationModel( 1, 0,-2, 2, 1,    -36.0,   0.0,    0.0,     20.0,  0.0,    0.0),
11562           new NutationModel(-3, 0, 2, 2, 2,     44.0,   0.0,    0.0,    -19.0,  0.0,    0.0),
11563           new NutationModel(-3, 0, 2, 2, 1,     26.0,   0.0,    0.0,    -14.0,  0.0,    0.0),
11564 
11565        /* 291-300 */
11566           new NutationModel(-2, 0, 2, 2, 0,    -60.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11567           new NutationModel( 2,-1, 0, 0, 1,     35.0,   0.0,    0.0,    -18.0,  0.0,    0.0),
11568           new NutationModel(-2, 1, 2, 2, 2,    -27.0,   0.0,    0.0,     11.0,  0.0,    0.0),
11569           new NutationModel( 1, 1, 0, 1, 0,     47.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11570           new NutationModel( 0, 1, 4,-2, 2,     36.0,   0.0,    0.0,    -15.0,  0.0,    0.0),
11571           new NutationModel(-1, 1, 0,-2, 1,    -36.0,   0.0,    0.0,     20.0,  0.0,    0.0),
11572           new NutationModel( 0, 0, 0,-4, 1,    -35.0,   0.0,    0.0,     19.0,  0.0,    0.0),
11573           new NutationModel( 1,-1, 0, 2, 1,    -37.0,   0.0,    0.0,     19.0,  0.0,    0.0),
11574           new NutationModel( 1, 1, 0, 2, 1,     32.0,   0.0,    0.0,    -16.0,  0.0,    0.0),
11575           new NutationModel(-1, 2, 2, 2, 2,     35.0,   0.0,    0.0,    -14.0,  0.0,    0.0),
11576 
11577        /* 301-310 */
11578           new NutationModel( 3, 1, 2,-2, 2,     32.0,   0.0,    0.0,    -13.0,  0.0,    0.0),
11579           new NutationModel( 0,-1, 0, 4, 0,     65.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11580           new NutationModel( 2,-1, 0, 2, 0,     47.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11581           new NutationModel( 0, 0, 4, 0, 1,     32.0,   0.0,    0.0,    -16.0,  0.0,    0.0),
11582           new NutationModel( 2, 0, 4,-2, 2,     37.0,   0.0,    0.0,    -16.0,  0.0,    0.0),
11583           new NutationModel(-1,-1, 2, 4, 1,    -30.0,   0.0,    0.0,     15.0,  0.0,    0.0),
11584           new NutationModel( 1, 0, 0, 4, 1,    -32.0,   0.0,    0.0,     16.0,  0.0,    0.0),
11585           new NutationModel( 1,-2, 2, 2, 2,    -31.0,   0.0,    0.0,     13.0,  0.0,    0.0),
11586           new NutationModel( 0, 0, 2, 3, 2,     37.0,   0.0,    0.0,    -16.0,  0.0,    0.0),
11587           new NutationModel(-1, 1, 2, 4, 2,     31.0,   0.0,    0.0,    -13.0,  0.0,    0.0),
11588 
11589        /* 311-320 */
11590           new NutationModel( 3, 0, 0, 2, 0,     49.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11591           new NutationModel(-1, 0, 4, 2, 2,     32.0,   0.0,    0.0,    -13.0,  0.0,    0.0),
11592           new NutationModel( 1, 1, 2, 2, 1,     23.0,   0.0,    0.0,    -12.0,  0.0,    0.0),
11593           new NutationModel(-2, 0, 2, 6, 2,    -43.0,   0.0,    0.0,     18.0,  0.0,    0.0),
11594           new NutationModel( 2, 1, 2, 2, 2,     26.0,   0.0,    0.0,    -11.0,  0.0,    0.0),
11595           new NutationModel(-1, 0, 2, 6, 2,    -32.0,   0.0,    0.0,     14.0,  0.0,    0.0),
11596           new NutationModel( 1, 0, 2, 4, 1,    -29.0,   0.0,    0.0,     14.0,  0.0,    0.0),
11597           new NutationModel( 2, 0, 2, 4, 2,    -27.0,   0.0,    0.0,     12.0,  0.0,    0.0),
11598           new NutationModel( 1, 1,-2, 1, 0,     30.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11599           new NutationModel(-3, 1, 2, 1, 2,    -11.0,   0.0,    0.0,      5.0,  0.0,    0.0),
11600 
11601        /* 321-330 */
11602           new NutationModel( 2, 0,-2, 0, 2,    -21.0,   0.0,    0.0,     10.0,  0.0,    0.0),
11603           new NutationModel(-1, 0, 0, 1, 2,    -34.0,   0.0,    0.0,     15.0,  0.0,    0.0),
11604           new NutationModel(-4, 0, 2, 2, 1,    -10.0,   0.0,    0.0,      6.0,  0.0,    0.0),
11605           new NutationModel(-1,-1, 0, 1, 0,    -36.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11606           new NutationModel( 0, 0,-2, 2, 2,     -9.0,   0.0,    0.0,      4.0,  0.0,    0.0),
11607           new NutationModel( 1, 0, 0,-1, 2,    -12.0,   0.0,    0.0,      5.0,  0.0,    0.0),
11608           new NutationModel( 0,-1, 2,-2, 3,    -21.0,   0.0,    0.0,      5.0,  0.0,    0.0),
11609           new NutationModel(-2, 1, 2, 0, 0,    -29.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11610           new NutationModel( 0, 0, 2,-2, 4,    -15.0,   0.0,    0.0,      3.0,  0.0,    0.0),
11611           new NutationModel(-2,-2, 0, 2, 0,    -20.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11612 
11613        /* 331-340 */
11614           new NutationModel(-2, 0,-2, 4, 0,     28.0,   0.0,    0.0,      0.0,  0.0,   -2.0),
11615           new NutationModel( 0,-2,-2, 2, 0,     17.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11616           new NutationModel( 1, 2, 0,-2, 1,    -22.0,   0.0,    0.0,     12.0,  0.0,    0.0),
11617           new NutationModel( 3, 0, 0,-4, 1,    -14.0,   0.0,    0.0,      7.0,  0.0,    0.0),
11618           new NutationModel(-1, 1, 2,-2, 2,     24.0,   0.0,    0.0,    -11.0,  0.0,    0.0),
11619           new NutationModel( 1,-1, 2,-4, 1,     11.0,   0.0,    0.0,     -6.0,  0.0,    0.0),
11620           new NutationModel( 1, 1, 0,-2, 2,     14.0,   0.0,    0.0,     -6.0,  0.0,    0.0),
11621           new NutationModel(-3, 0, 2, 0, 0,     24.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11622           new NutationModel(-3, 0, 2, 0, 2,     18.0,   0.0,    0.0,     -8.0,  0.0,    0.0),
11623           new NutationModel(-2, 0, 0, 1, 0,    -38.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11624 
11625        /* 341-350 */
11626           new NutationModel( 0, 0,-2, 1, 0,    -31.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11627           new NutationModel(-3, 0, 0, 2, 1,    -16.0,   0.0,    0.0,      8.0,  0.0,    0.0),
11628           new NutationModel(-1,-1,-2, 2, 0,     29.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11629           new NutationModel( 0, 1, 2,-4, 1,    -18.0,   0.0,    0.0,     10.0,  0.0,    0.0),
11630           new NutationModel( 2, 1, 0,-4, 1,    -10.0,   0.0,    0.0,      5.0,  0.0,    0.0),
11631           new NutationModel( 0, 2, 0,-2, 1,    -17.0,   0.0,    0.0,     10.0,  0.0,    0.0),
11632           new NutationModel( 1, 0, 0,-3, 1,      9.0,   0.0,    0.0,     -4.0,  0.0,    0.0),
11633           new NutationModel(-2, 0, 2,-2, 2,     16.0,   0.0,    0.0,     -6.0,  0.0,    0.0),
11634           new NutationModel(-2,-1, 0, 0, 1,     22.0,   0.0,    0.0,    -12.0,  0.0,    0.0),
11635           new NutationModel(-4, 0, 0, 2, 0,     20.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11636 
11637        /* 351-360 */
11638           new NutationModel( 1, 1, 0,-4, 1,    -13.0,   0.0,    0.0,      6.0,  0.0,    0.0),
11639           new NutationModel(-1, 0, 2,-4, 1,    -17.0,   0.0,    0.0,      9.0,  0.0,    0.0),
11640           new NutationModel( 0, 0, 4,-4, 1,    -14.0,   0.0,    0.0,      8.0,  0.0,    0.0),
11641           new NutationModel( 0, 3, 2,-2, 2,      0.0,   0.0,    0.0,     -7.0,  0.0,    0.0),
11642           new NutationModel(-3,-1, 0, 4, 0,     14.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11643           new NutationModel(-3, 0, 0, 4, 1,     19.0,   0.0,    0.0,    -10.0,  0.0,    0.0),
11644           new NutationModel( 1,-1,-2, 2, 0,    -34.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11645           new NutationModel(-1,-1, 0, 2, 2,    -20.0,   0.0,    0.0,      8.0,  0.0,    0.0),
11646           new NutationModel( 1,-2, 0, 0, 1,      9.0,   0.0,    0.0,     -5.0,  0.0,    0.0),
11647           new NutationModel( 1,-1, 0, 0, 2,    -18.0,   0.0,    0.0,      7.0,  0.0,    0.0),
11648 
11649        /* 361-370 */
11650           new NutationModel( 0, 0, 0, 1, 2,     13.0,   0.0,    0.0,     -6.0,  0.0,    0.0),
11651           new NutationModel(-1,-1, 2, 0, 0,     17.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11652           new NutationModel( 1,-2, 2,-2, 2,    -12.0,   0.0,    0.0,      5.0,  0.0,    0.0),
11653           new NutationModel( 0,-1, 2,-1, 1,     15.0,   0.0,    0.0,     -8.0,  0.0,    0.0),
11654           new NutationModel(-1, 0, 2, 0, 3,    -11.0,   0.0,    0.0,      3.0,  0.0,    0.0),
11655           new NutationModel( 1, 1, 0, 0, 2,     13.0,   0.0,    0.0,     -5.0,  0.0,    0.0),
11656           new NutationModel(-1, 1, 2, 0, 0,    -18.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11657           new NutationModel( 1, 2, 0, 0, 0,    -35.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11658           new NutationModel(-1, 2, 2, 0, 2,      9.0,   0.0,    0.0,     -4.0,  0.0,    0.0),
11659           new NutationModel(-1, 0, 4,-2, 1,    -19.0,   0.0,    0.0,     10.0,  0.0,    0.0),
11660 
11661        /* 371-380 */
11662           new NutationModel( 3, 0, 2,-4, 2,    -26.0,   0.0,    0.0,     11.0,  0.0,    0.0),
11663           new NutationModel( 1, 2, 2,-2, 1,      8.0,   0.0,    0.0,     -4.0,  0.0,    0.0),
11664           new NutationModel( 1, 0, 4,-4, 2,    -10.0,   0.0,    0.0,      4.0,  0.0,    0.0),
11665           new NutationModel(-2,-1, 0, 4, 1,     10.0,   0.0,    0.0,     -6.0,  0.0,    0.0),
11666           new NutationModel( 0,-1, 0, 2, 2,    -21.0,   0.0,    0.0,      9.0,  0.0,    0.0),
11667           new NutationModel(-2, 1, 0, 4, 0,    -15.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11668           new NutationModel(-2,-1, 2, 2, 1,      9.0,   0.0,    0.0,     -5.0,  0.0,    0.0),
11669           new NutationModel( 2, 0,-2, 2, 0,    -29.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11670           new NutationModel( 1, 0, 0, 1, 1,    -19.0,   0.0,    0.0,     10.0,  0.0,    0.0),
11671           new NutationModel( 0, 1, 0, 2, 2,     12.0,   0.0,    0.0,     -5.0,  0.0,    0.0),
11672 
11673        /* 381-390 */
11674           new NutationModel( 1,-1, 2,-1, 2,     22.0,   0.0,    0.0,     -9.0,  0.0,    0.0),
11675           new NutationModel(-2, 0, 4, 0, 1,    -10.0,   0.0,    0.0,      5.0,  0.0,    0.0),
11676           new NutationModel( 2, 1, 0, 0, 1,    -20.0,   0.0,    0.0,     11.0,  0.0,    0.0),
11677           new NutationModel( 0, 1, 2, 0, 0,    -20.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11678           new NutationModel( 0,-1, 4,-2, 2,    -17.0,   0.0,    0.0,      7.0,  0.0,    0.0),
11679           new NutationModel( 0, 0, 4,-2, 4,     15.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11680           new NutationModel( 0, 2, 2, 0, 1,      8.0,   0.0,    0.0,     -4.0,  0.0,    0.0),
11681           new NutationModel(-3, 0, 0, 6, 0,     14.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11682           new NutationModel(-1,-1, 0, 4, 1,    -12.0,   0.0,    0.0,      6.0,  0.0,    0.0),
11683           new NutationModel( 1,-2, 0, 2, 0,     25.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11684 
11685        /* 391-400 */
11686           new NutationModel(-1, 0, 0, 4, 2,    -13.0,   0.0,    0.0,      6.0,  0.0,    0.0),
11687           new NutationModel(-1,-2, 2, 2, 1,    -14.0,   0.0,    0.0,      8.0,  0.0,    0.0),
11688           new NutationModel(-1, 0, 0,-2, 2,     13.0,   0.0,    0.0,     -5.0,  0.0,    0.0),
11689           new NutationModel( 1, 0,-2,-2, 1,    -17.0,   0.0,    0.0,      9.0,  0.0,    0.0),
11690           new NutationModel( 0, 0,-2,-2, 1,    -12.0,   0.0,    0.0,      6.0,  0.0,    0.0),
11691           new NutationModel(-2, 0,-2, 0, 1,    -10.0,   0.0,    0.0,      5.0,  0.0,    0.0),
11692           new NutationModel( 0, 0, 0, 3, 1,     10.0,   0.0,    0.0,     -6.0,  0.0,    0.0),
11693           new NutationModel( 0, 0, 0, 3, 0,    -15.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11694           new NutationModel(-1, 1, 0, 4, 0,    -22.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11695           new NutationModel(-1,-1, 2, 2, 0,     28.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11696 
11697        /* 401-410 */
11698           new NutationModel(-2, 0, 2, 3, 2,     15.0,   0.0,    0.0,     -7.0,  0.0,    0.0),
11699           new NutationModel( 1, 0, 0, 2, 2,     23.0,   0.0,    0.0,    -10.0,  0.0,    0.0),
11700           new NutationModel( 0,-1, 2, 1, 2,     12.0,   0.0,    0.0,     -5.0,  0.0,    0.0),
11701           new NutationModel( 3,-1, 0, 0, 0,     29.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11702           new NutationModel( 2, 0, 0, 1, 0,    -25.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11703           new NutationModel( 1,-1, 2, 0, 0,     22.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11704           new NutationModel( 0, 0, 2, 1, 0,    -18.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11705           new NutationModel( 1, 0, 2, 0, 3,     15.0,   0.0,    0.0,      3.0,  0.0,    0.0),
11706           new NutationModel( 3, 1, 0, 0, 0,    -23.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11707           new NutationModel( 3,-1, 2,-2, 2,     12.0,   0.0,    0.0,     -5.0,  0.0,    0.0),
11708 
11709        /* 411-420 */
11710           new NutationModel( 2, 0, 2,-1, 1,     -8.0,   0.0,    0.0,      4.0,  0.0,    0.0),
11711           new NutationModel( 1, 1, 2, 0, 0,    -19.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11712           new NutationModel( 0, 0, 4,-1, 2,    -10.0,   0.0,    0.0,      4.0,  0.0,    0.0),
11713           new NutationModel( 1, 2, 2, 0, 2,     21.0,   0.0,    0.0,     -9.0,  0.0,    0.0),
11714           new NutationModel(-2, 0, 0, 6, 0,     23.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11715           new NutationModel( 0,-1, 0, 4, 1,    -16.0,   0.0,    0.0,      8.0,  0.0,    0.0),
11716           new NutationModel(-2,-1, 2, 4, 1,    -19.0,   0.0,    0.0,      9.0,  0.0,    0.0),
11717           new NutationModel( 0,-2, 2, 2, 1,    -22.0,   0.0,    0.0,     10.0,  0.0,    0.0),
11718           new NutationModel( 0,-1, 2, 2, 0,     27.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11719           new NutationModel(-1, 0, 2, 3, 1,     16.0,   0.0,    0.0,     -8.0,  0.0,    0.0),
11720 
11721        /* 421-430 */
11722           new NutationModel(-2, 1, 2, 4, 2,     19.0,   0.0,    0.0,     -8.0,  0.0,    0.0),
11723           new NutationModel( 2, 0, 0, 2, 2,      9.0,   0.0,    0.0,     -4.0,  0.0,    0.0),
11724           new NutationModel( 2,-2, 2, 0, 2,     -9.0,   0.0,    0.0,      4.0,  0.0,    0.0),
11725           new NutationModel(-1, 1, 2, 3, 2,     -9.0,   0.0,    0.0,      4.0,  0.0,    0.0),
11726           new NutationModel( 3, 0, 2,-1, 2,     -8.0,   0.0,    0.0,      4.0,  0.0,    0.0),
11727           new NutationModel( 4, 0, 2,-2, 1,     18.0,   0.0,    0.0,     -9.0,  0.0,    0.0),
11728           new NutationModel(-1, 0, 0, 6, 0,     16.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11729           new NutationModel(-1,-2, 2, 4, 2,    -10.0,   0.0,    0.0,      4.0,  0.0,    0.0),
11730           new NutationModel(-3, 0, 2, 6, 2,    -23.0,   0.0,    0.0,      9.0,  0.0,    0.0),
11731           new NutationModel(-1, 0, 2, 4, 0,     16.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11732 
11733        /* 431-440 */
11734           new NutationModel( 3, 0, 0, 2, 1,    -12.0,   0.0,    0.0,      6.0,  0.0,    0.0),
11735           new NutationModel( 3,-1, 2, 0, 1,     -8.0,   0.0,    0.0,      4.0,  0.0,    0.0),
11736           new NutationModel( 3, 0, 2, 0, 0,     30.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11737           new NutationModel( 1, 0, 4, 0, 2,     24.0,   0.0,    0.0,    -10.0,  0.0,    0.0),
11738           new NutationModel( 5, 0, 2,-2, 2,     10.0,   0.0,    0.0,     -4.0,  0.0,    0.0),
11739           new NutationModel( 0,-1, 2, 4, 1,    -16.0,   0.0,    0.0,      7.0,  0.0,    0.0),
11740           new NutationModel( 2,-1, 2, 2, 1,    -16.0,   0.0,    0.0,      7.0,  0.0,    0.0),
11741           new NutationModel( 0, 1, 2, 4, 2,     17.0,   0.0,    0.0,     -7.0,  0.0,    0.0),
11742           new NutationModel( 1,-1, 2, 4, 2,    -24.0,   0.0,    0.0,     10.0,  0.0,    0.0),
11743           new NutationModel( 3,-1, 2, 2, 2,    -12.0,   0.0,    0.0,      5.0,  0.0,    0.0),
11744 
11745        /* 441-450 */
11746           new NutationModel( 3, 0, 2, 2, 1,    -24.0,   0.0,    0.0,     11.0,  0.0,    0.0),
11747           new NutationModel( 5, 0, 2, 0, 2,    -23.0,   0.0,    0.0,      9.0,  0.0,    0.0),
11748           new NutationModel( 0, 0, 2, 6, 2,    -13.0,   0.0,    0.0,      5.0,  0.0,    0.0),
11749           new NutationModel( 4, 0, 2, 2, 2,    -15.0,   0.0,    0.0,      7.0,  0.0,    0.0),
11750           new NutationModel( 0,-1, 1,-1, 1,      0.0,   0.0,-1988.0,      0.0,  0.0,-1679.0),
11751           new NutationModel(-1, 0, 1, 0, 3,      0.0,   0.0,  -63.0,      0.0,  0.0,  -27.0),
11752           new NutationModel( 0,-2, 2,-2, 3,     -4.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11753           new NutationModel( 1, 0,-1, 0, 1,      0.0,   0.0,    5.0,      0.0,  0.0,    4.0),
11754           new NutationModel( 2,-2, 0,-2, 1,      5.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11755           new NutationModel(-1, 0, 1, 0, 2,      0.0,   0.0,  364.0,      0.0,  0.0,  176.0),
11756 
11757        /* 451-460 */
11758           new NutationModel(-1, 0, 1, 0, 1,      0.0,   0.0,-1044.0,      0.0,  0.0, -891.0),
11759           new NutationModel(-1,-1, 2,-1, 2,     -3.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11760           new NutationModel(-2, 2, 0, 2, 2,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11761           new NutationModel(-1, 0, 1, 0, 0,      0.0,   0.0,  330.0,      0.0,  0.0,    0.0),
11762           new NutationModel(-4, 1, 2, 2, 2,      5.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11763           new NutationModel(-3, 0, 2, 1, 1,      3.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11764           new NutationModel(-2,-1, 2, 0, 2,     -3.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11765           new NutationModel( 1, 0,-2, 1, 1,     -5.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11766           new NutationModel( 2,-1,-2, 0, 1,      3.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11767           new NutationModel(-4, 0, 2, 2, 0,      3.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11768 
11769        /* 461-470 */
11770           new NutationModel(-3, 1, 0, 3, 0,      3.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11771           new NutationModel(-1, 0,-1, 2, 0,      0.0,   0.0,    5.0,      0.0,  0.0,    0.0),
11772           new NutationModel( 0,-2, 0, 0, 2,      0.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11773           new NutationModel( 0,-2, 0, 0, 2,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11774           new NutationModel(-3, 0, 0, 3, 0,      6.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11775           new NutationModel(-2,-1, 0, 2, 2,      5.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11776           new NutationModel(-1, 0,-2, 3, 0,     -7.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11777           new NutationModel(-4, 0, 0, 4, 0,    -12.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11778           new NutationModel( 2, 1,-2, 0, 1,      5.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11779           new NutationModel( 2,-1, 0,-2, 2,      3.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11780 
11781        /* 471-480 */
11782           new NutationModel( 0, 0, 1,-1, 0,     -5.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11783           new NutationModel(-1, 2, 0, 1, 0,      3.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11784           new NutationModel(-2, 1, 2, 0, 2,     -7.0,   0.0,    0.0,      3.0,  0.0,    0.0),
11785           new NutationModel( 1, 1, 0,-1, 1,      7.0,   0.0,    0.0,     -4.0,  0.0,    0.0),
11786           new NutationModel( 1, 0, 1,-2, 1,      0.0,   0.0,  -12.0,      0.0,  0.0,  -10.0),
11787           new NutationModel( 0, 2, 0, 0, 2,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11788           new NutationModel( 1,-1, 2,-3, 1,      3.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11789           new NutationModel(-1, 1, 2,-1, 1,     -3.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11790           new NutationModel(-2, 0, 4,-2, 2,     -7.0,   0.0,    0.0,      3.0,  0.0,    0.0),
11791           new NutationModel(-2, 0, 4,-2, 1,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11792 
11793        /* 481-490 */
11794           new NutationModel(-2,-2, 0, 2, 1,     -3.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11795           new NutationModel(-2, 0,-2, 4, 0,      0.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11796           new NutationModel( 1, 2, 2,-4, 1,     -3.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11797           new NutationModel( 1, 1, 2,-4, 2,      7.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11798           new NutationModel(-1, 2, 2,-2, 1,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11799           new NutationModel( 2, 0, 0,-3, 1,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11800           new NutationModel(-1, 2, 0, 0, 1,     -5.0,   0.0,    0.0,      3.0,  0.0,    0.0),
11801           new NutationModel( 0, 0, 0,-2, 0,      5.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11802           new NutationModel(-1,-1, 2,-2, 2,     -5.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11803           new NutationModel(-1, 1, 0, 0, 2,      5.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11804 
11805        /* 491-500 */
11806           new NutationModel( 0, 0, 0,-1, 2,     -8.0,   0.0,    0.0,      3.0,  0.0,    0.0),
11807           new NutationModel(-2, 1, 0, 1, 0,      9.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11808           new NutationModel( 1,-2, 0,-2, 1,      6.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11809           new NutationModel( 1, 0,-2, 0, 2,     -5.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11810           new NutationModel(-3, 1, 0, 2, 0,      3.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11811           new NutationModel(-1, 1,-2, 2, 0,     -7.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11812           new NutationModel(-1,-1, 0, 0, 2,     -3.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11813           new NutationModel(-3, 0, 0, 2, 0,      5.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11814           new NutationModel(-3,-1, 0, 2, 0,      3.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11815           new NutationModel( 2, 0, 2,-6, 1,     -3.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11816 
11817        /* 501-510 */
11818           new NutationModel( 0, 1, 2,-4, 2,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11819           new NutationModel( 2, 0, 0,-4, 2,      3.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11820           new NutationModel(-2, 1, 2,-2, 1,     -5.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11821           new NutationModel( 0,-1, 2,-4, 1,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11822           new NutationModel( 0, 1, 0,-2, 2,      9.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11823           new NutationModel(-1, 0, 0,-2, 0,      4.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11824           new NutationModel( 2, 0,-2,-2, 1,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11825           new NutationModel(-4, 0, 2, 0, 1,     -3.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11826           new NutationModel(-1,-1, 0,-1, 1,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11827           new NutationModel( 0, 0,-2, 0, 2,      9.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11828 
11829        /* 511-520 */
11830           new NutationModel(-3, 0, 0, 1, 0,     -4.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11831           new NutationModel(-1, 0,-2, 1, 0,     -4.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11832           new NutationModel(-2, 0,-2, 2, 1,      3.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11833           new NutationModel( 0, 0,-4, 2, 0,      8.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11834           new NutationModel(-2,-1,-2, 2, 0,      3.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11835           new NutationModel( 1, 0, 2,-6, 1,     -3.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11836           new NutationModel(-1, 0, 2,-4, 2,      3.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11837           new NutationModel( 1, 0, 0,-4, 2,      3.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11838           new NutationModel( 2, 1, 2,-4, 2,     -3.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11839           new NutationModel( 2, 1, 2,-4, 1,      6.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11840 
11841        /* 521-530 */
11842           new NutationModel( 0, 1, 4,-4, 4,      3.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11843           new NutationModel( 0, 1, 4,-4, 2,     -3.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11844           new NutationModel(-1,-1,-2, 4, 0,     -7.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11845           new NutationModel(-1,-3, 0, 2, 0,      9.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11846           new NutationModel(-1, 0,-2, 4, 1,     -3.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11847           new NutationModel(-2,-1, 0, 3, 0,     -3.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11848           new NutationModel( 0, 0,-2, 3, 0,     -4.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11849           new NutationModel(-2, 0, 0, 3, 1,     -5.0,   0.0,    0.0,      3.0,  0.0,    0.0),
11850           new NutationModel( 0,-1, 0, 1, 0,    -13.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11851           new NutationModel(-3, 0, 2, 2, 0,     -7.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11852 
11853        /* 531-540 */
11854           new NutationModel( 1, 1,-2, 2, 0,     10.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11855           new NutationModel(-1, 1, 0, 2, 2,      3.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11856           new NutationModel( 1,-2, 2,-2, 1,     10.0,   0.0,   13.0,      6.0,  0.0,   -5.0),
11857           new NutationModel( 0, 0, 1, 0, 2,      0.0,   0.0,   30.0,      0.0,  0.0,   14.0),
11858           new NutationModel( 0, 0, 1, 0, 1,      0.0,   0.0, -162.0,      0.0,  0.0, -138.0),
11859           new NutationModel( 0, 0, 1, 0, 0,      0.0,   0.0,   75.0,      0.0,  0.0,    0.0),
11860           new NutationModel(-1, 2, 0, 2, 1,     -7.0,   0.0,    0.0,      4.0,  0.0,    0.0),
11861           new NutationModel( 0, 0, 2, 0, 2,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11862           new NutationModel(-2, 0, 2, 0, 2,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11863           new NutationModel( 2, 0, 0,-1, 1,      5.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11864 
11865        /* 541-550 */
11866           new NutationModel( 3, 0, 0,-2, 1,      5.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11867           new NutationModel( 1, 0, 2,-2, 3,     -3.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11868           new NutationModel( 1, 2, 0, 0, 1,     -3.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11869           new NutationModel( 2, 0, 2,-3, 2,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11870           new NutationModel(-1, 1, 4,-2, 2,     -5.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11871           new NutationModel(-2,-2, 0, 4, 0,      6.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11872           new NutationModel( 0,-3, 0, 2, 0,      9.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11873           new NutationModel( 0, 0,-2, 4, 0,      5.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11874           new NutationModel(-1,-1, 0, 3, 0,     -7.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11875           new NutationModel(-2, 0, 0, 4, 2,     -3.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11876 
11877        /* 551-560 */
11878           new NutationModel(-1, 0, 0, 3, 1,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11879           new NutationModel( 2,-2, 0, 0, 0,      7.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11880           new NutationModel( 1,-1, 0, 1, 0,     -4.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11881           new NutationModel(-1, 0, 0, 2, 0,      4.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11882           new NutationModel( 0,-2, 2, 0, 1,     -6.0,   0.0,   -3.0,      3.0,  0.0,    1.0),
11883           new NutationModel(-1, 0, 1, 2, 1,      0.0,   0.0,   -3.0,      0.0,  0.0,   -2.0),
11884           new NutationModel(-1, 1, 0, 3, 0,     11.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11885           new NutationModel(-1,-1, 2, 1, 2,      3.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11886           new NutationModel( 0,-1, 2, 0, 0,     11.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11887           new NutationModel(-2, 1, 2, 2, 1,     -3.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11888 
11889        /* 561-570 */
11890           new NutationModel( 2,-2, 2,-2, 2,     -1.0,   0.0,    3.0,      3.0,  0.0,   -1.0),
11891           new NutationModel( 1, 1, 0, 1, 1,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11892           new NutationModel( 1, 0, 1, 0, 1,      0.0,   0.0,  -13.0,      0.0,  0.0,  -11.0),
11893           new NutationModel( 1, 0, 1, 0, 0,      3.0,   0.0,    6.0,      0.0,  0.0,    0.0),
11894           new NutationModel( 0, 2, 0, 2, 0,     -7.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11895           new NutationModel( 2,-1, 2,-2, 1,      5.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11896           new NutationModel( 0,-1, 4,-2, 1,     -3.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11897           new NutationModel( 0, 0, 4,-2, 3,      3.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11898           new NutationModel( 0, 1, 4,-2, 1,      5.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11899           new NutationModel( 4, 0, 2,-4, 2,     -7.0,   0.0,    0.0,      3.0,  0.0,    0.0),
11900 
11901        /* 571-580 */
11902           new NutationModel( 2, 2, 2,-2, 2,      8.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11903           new NutationModel( 2, 0, 4,-4, 2,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11904           new NutationModel(-1,-2, 0, 4, 0,     11.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11905           new NutationModel(-1,-3, 2, 2, 2,     -3.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11906           new NutationModel(-3, 0, 2, 4, 2,      3.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11907           new NutationModel(-3, 0, 2,-2, 1,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11908           new NutationModel(-1,-1, 0,-2, 1,      8.0,   0.0,    0.0,     -4.0,  0.0,    0.0),
11909           new NutationModel(-3, 0, 0, 0, 2,      3.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11910           new NutationModel(-3, 0,-2, 2, 0,     11.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11911           new NutationModel( 0, 1, 0,-4, 1,     -6.0,   0.0,    0.0,      3.0,  0.0,    0.0),
11912 
11913        /* 581-590 */
11914           new NutationModel(-2, 1, 0,-2, 1,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11915           new NutationModel(-4, 0, 0, 0, 1,     -8.0,   0.0,    0.0,      4.0,  0.0,    0.0),
11916           new NutationModel(-1, 0, 0,-4, 1,     -7.0,   0.0,    0.0,      3.0,  0.0,    0.0),
11917           new NutationModel(-3, 0, 0,-2, 1,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11918           new NutationModel( 0, 0, 0, 3, 2,      3.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11919           new NutationModel(-1, 1, 0, 4, 1,      6.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11920           new NutationModel( 1,-2, 2, 0, 1,     -6.0,   0.0,    0.0,      3.0,  0.0,    0.0),
11921           new NutationModel( 0, 1, 0, 3, 0,      6.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11922           new NutationModel(-1, 0, 2, 2, 3,      6.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11923           new NutationModel( 0, 0, 2, 2, 2,      5.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11924 
11925        /* 591-600 */
11926           new NutationModel(-2, 0, 2, 2, 2,     -5.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11927           new NutationModel(-1, 1, 2, 2, 0,     -4.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11928           new NutationModel( 3, 0, 0, 0, 2,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11929           new NutationModel( 2, 1, 0, 1, 0,      4.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11930           new NutationModel( 2,-1, 2,-1, 2,      6.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11931           new NutationModel( 0, 0, 2, 0, 1,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11932           new NutationModel( 0, 0, 3, 0, 3,      0.0,   0.0,  -26.0,      0.0,  0.0,  -11.0),
11933           new NutationModel( 0, 0, 3, 0, 2,      0.0,   0.0,  -10.0,      0.0,  0.0,   -5.0),
11934           new NutationModel(-1, 2, 2, 2, 1,      5.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11935           new NutationModel(-1, 0, 4, 0, 0,    -13.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11936 
11937        /* 601-610 */
11938           new NutationModel( 1, 2, 2, 0, 1,      3.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11939           new NutationModel( 3, 1, 2,-2, 1,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11940           new NutationModel( 1, 1, 4,-2, 2,      7.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11941           new NutationModel(-2,-1, 0, 6, 0,      4.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11942           new NutationModel( 0,-2, 0, 4, 0,      5.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11943           new NutationModel(-2, 0, 0, 6, 1,     -3.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11944           new NutationModel(-2,-2, 2, 4, 2,     -6.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11945           new NutationModel( 0,-3, 2, 2, 2,     -5.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11946           new NutationModel( 0, 0, 0, 4, 2,     -7.0,   0.0,    0.0,      3.0,  0.0,    0.0),
11947           new NutationModel(-1,-1, 2, 3, 2,      5.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11948 
11949        /* 611-620 */
11950           new NutationModel(-2, 0, 2, 4, 0,     13.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11951           new NutationModel( 2,-1, 0, 2, 1,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11952           new NutationModel( 1, 0, 0, 3, 0,     -3.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11953           new NutationModel( 0, 1, 0, 4, 1,      5.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11954           new NutationModel( 0, 1, 0, 4, 0,    -11.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11955           new NutationModel( 1,-1, 2, 1, 2,      5.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11956           new NutationModel( 0, 0, 2, 2, 3,      4.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11957           new NutationModel( 1, 0, 2, 2, 2,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11958           new NutationModel(-1, 0, 2, 2, 2,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11959           new NutationModel(-2, 0, 4, 2, 1,      6.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11960 
11961        /* 621-630 */
11962           new NutationModel( 2, 1, 0, 2, 1,      3.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11963           new NutationModel( 2, 1, 0, 2, 0,    -12.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11964           new NutationModel( 2,-1, 2, 0, 0,      4.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11965           new NutationModel( 1, 0, 2, 1, 0,     -3.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11966           new NutationModel( 0, 1, 2, 2, 0,     -4.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11967           new NutationModel( 2, 0, 2, 0, 3,      3.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11968           new NutationModel( 3, 0, 2, 0, 2,      3.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11969           new NutationModel( 1, 0, 2, 0, 2,     -3.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11970           new NutationModel( 1, 0, 3, 0, 3,      0.0,   0.0,   -5.0,      0.0,  0.0,   -2.0),
11971           new NutationModel( 1, 1, 2, 1, 1,     -7.0,   0.0,    0.0,      4.0,  0.0,    0.0),
11972 
11973        /* 631-640 */
11974           new NutationModel( 0, 2, 2, 2, 2,      6.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11975           new NutationModel( 2, 1, 2, 0, 0,     -3.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11976           new NutationModel( 2, 0, 4,-2, 1,      5.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11977           new NutationModel( 4, 1, 2,-2, 2,      3.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11978           new NutationModel(-1,-1, 0, 6, 0,      3.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11979           new NutationModel(-3,-1, 2, 6, 2,     -3.0,   0.0,    0.0,      1.0,  0.0,    0.0),
11980           new NutationModel(-1, 0, 0, 6, 1,     -5.0,   0.0,    0.0,      3.0,  0.0,    0.0),
11981           new NutationModel(-3, 0, 2, 6, 1,     -3.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11982           new NutationModel( 1,-1, 0, 4, 1,     -3.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11983           new NutationModel( 1,-1, 0, 4, 0,     12.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11984 
11985        /* 641-650 */
11986           new NutationModel(-2, 0, 2, 5, 2,      3.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
11987           new NutationModel( 1,-2, 2, 2, 1,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
11988           new NutationModel( 3,-1, 0, 2, 0,      4.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11989           new NutationModel( 1,-1, 2, 2, 0,      6.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11990           new NutationModel( 0, 0, 2, 3, 1,      5.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11991           new NutationModel(-1, 1, 2, 4, 1,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11992           new NutationModel( 0, 1, 2, 3, 2,     -6.0,   0.0,    0.0,      3.0,  0.0,    0.0),
11993           new NutationModel(-1, 0, 4, 2, 1,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
11994           new NutationModel( 2, 0, 2, 1, 1,      6.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
11995           new NutationModel( 5, 0, 0, 0, 0,      6.0,   0.0,    0.0,      0.0,  0.0,    0.0),
11996 
11997        /* 651-660 */
11998           new NutationModel( 2, 1, 2, 1, 2,     -6.0,   0.0,    0.0,      3.0,  0.0,    0.0),
11999           new NutationModel( 1, 0, 4, 0, 1,      3.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
12000           new NutationModel( 3, 1, 2, 0, 1,      7.0,   0.0,    0.0,     -4.0,  0.0,    0.0),
12001           new NutationModel( 3, 0, 4,-2, 2,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
12002           new NutationModel(-2,-1, 2, 6, 2,     -5.0,   0.0,    0.0,      2.0,  0.0,    0.0),
12003           new NutationModel( 0, 0, 0, 6, 0,      5.0,   0.0,    0.0,      0.0,  0.0,    0.0),
12004           new NutationModel( 0,-2, 2, 4, 2,     -6.0,   0.0,    0.0,      3.0,  0.0,    0.0),
12005           new NutationModel(-2, 0, 2, 6, 1,     -6.0,   0.0,    0.0,      3.0,  0.0,    0.0),
12006           new NutationModel( 2, 0, 0, 4, 1,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
12007           new NutationModel( 2, 0, 0, 4, 0,     10.0,   0.0,    0.0,      0.0,  0.0,    0.0),
12008 
12009        /* 661-670 */
12010           new NutationModel( 2,-2, 2, 2, 2,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
12011           new NutationModel( 0, 0, 2, 4, 0,      7.0,   0.0,    0.0,      0.0,  0.0,    0.0),
12012           new NutationModel( 1, 0, 2, 3, 2,      7.0,   0.0,    0.0,     -3.0,  0.0,    0.0),
12013           new NutationModel( 4, 0, 0, 2, 0,      4.0,   0.0,    0.0,      0.0,  0.0,    0.0),
12014           new NutationModel( 2, 0, 2, 2, 0,     11.0,   0.0,    0.0,      0.0,  0.0,    0.0),
12015           new NutationModel( 0, 0, 4, 2, 2,      5.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
12016           new NutationModel( 4,-1, 2, 0, 2,     -6.0,   0.0,    0.0,      2.0,  0.0,    0.0),
12017           new NutationModel( 3, 0, 2, 1, 2,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
12018           new NutationModel( 2, 1, 2, 2, 1,      3.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
12019           new NutationModel( 4, 1, 2, 0, 2,      5.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
12020 
12021        /* 671-678 */
12022           new NutationModel(-1,-1, 2, 6, 2,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
12023           new NutationModel(-1, 0, 2, 6, 1,     -4.0,   0.0,    0.0,      2.0,  0.0,    0.0),
12024           new NutationModel( 1,-1, 2, 4, 1,     -3.0,   0.0,    0.0,      2.0,  0.0,    0.0),
12025           new NutationModel( 1, 1, 2, 4, 2,      4.0,   0.0,    0.0,     -2.0,  0.0,    0.0),
12026           new NutationModel( 3, 1, 2, 2, 2,      3.0,   0.0,    0.0,     -1.0,  0.0,    0.0),
12027           new NutationModel( 5, 0, 2, 0, 1,     -3.0,   0.0,    0.0,      1.0,  0.0,    0.0),
12028           new NutationModel( 2,-1, 2, 4, 2,     -3.0,   0.0,    0.0,      1.0,  0.0,    0.0),
12029           new NutationModel( 2, 0, 2, 4, 1,     -3.0,   0.0,    0.0,      2.0,  0.0,    0.0)
12030        };
12031 
12032     /* Number of terms in the luni-solar nutation model */
12033        final int NLS = xls.length;
12034 
12035     /* ------------------------ */
12036     /* Planetary nutation model */
12037     /* ------------------------ */
12038 
12039     /* The units for the sine and cosine coefficients are */
12040     /* 0.1 microarcsecond                                 */
12041 
12042         final class PlanetaryNutModel {
12043          final int nl,               /* coefficients of l, F, D and Omega */
12044               nf,
12045               nd,
12046               nom,
12047               nme,              /* coefficients of planetary longitudes */
12048               nve,
12049               nea,
12050               nma,
12051               nju,
12052               nsa,
12053               nur,
12054               nne,
12055               npa;              /* coefficient of general precession */
12056           final int sp,cp;            /* longitude sin, cos coefficients */
12057           final int se,ce;            /* obliquity sin, cos coefficients */
12058           public PlanetaryNutModel(          int nl,               
12059                   int nf,
12060                   int nd,
12061                   int nom,
12062                   int nme,     
12063                   int nve,
12064                   int nea,
12065                   int nma,
12066                   int nju,
12067                   int nsa,
12068                   int nur,
12069                   int nne,
12070                   int npa,              
12071               int sp,int cp,           
12072               int se,int ce           
12073 ) {
12074               this.nl = nl;               /* coefficients of l, F, D and Omega */
12075               this.nf = nf;
12076               this.nd = nd;
12077               this.nom = nom;
12078               this.nme = nme;              /* coefficients of planetary longitudes */
12079               this.nve = nve;
12080               this.nea = nea;
12081               this.nma = nma;
12082               this.nju = nju;
12083               this.nsa = nsa;
12084               this.nur = nur;
12085               this.nne = nne;
12086               this.npa = npa;              /* coefficient of general precession */
12087            this.sp = sp; this.cp = cp;            /* longitude sin, cos coefficients */
12088            this.se = se; this.ce = ce;            /* obliquity sin, cos coefficients */
12089       
12090         }
12091        }
12092        
12093        PlanetaryNutModel xpl[] = {
12094 
12095        /* 1-10 */
12096           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  8,-16, 4, 5, 0, 0, 0, 1440,   0,    0,   0),
12097           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -8, 16,-4,-5, 0, 0, 2,   56,-117,  -42, -40),
12098           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  8,-16, 4, 5, 0, 0, 2,  125, -43,    0, -54),
12099           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0, 0,-1, 2, 2,    0,   5,    0,   0),
12100           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -4,  8,-1,-5, 0, 0, 2,    3,  -7,   -3,   0),
12101           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4, -8, 3, 0, 0, 0, 1,    3,   0,    0,  -2),
12102           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0,  3, -8, 3, 0, 0, 0, 0, -114,   0,    0,  61),
12103           new PlanetaryNutModel(-1, 0, 0, 0, 0, 10, -3,  0, 0, 0, 0, 0, 0, -219,  89,    0,   0),
12104           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0,-2, 6,-3, 0, 2,   -3,   0,    0,   0),
12105           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4, -8, 3, 0, 0, 0, 0, -462,1604,    0,   0),
12106 
12107        /* 11-20 */
12108           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -5,  8,-3, 0, 0, 0, 0,   99,   0,    0, -53),
12109           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -4,  8,-3, 0, 0, 0, 1,   -3,   0,    0,   2),
12110           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4, -8, 1, 5, 0, 0, 2,    0,   6,    2,   0),
12111           new PlanetaryNutModel( 0, 0, 0, 0, 0, -5,  6,  4, 0, 0, 0, 0, 2,    3,   0,    0,   0),
12112           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 2,-5, 0, 0, 2,  -12,   0,    0,   0),
12113           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 2,-5, 0, 0, 1,   14,-218,  117,   8),
12114           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0, 2,-5, 0, 0, 0,   31,-481, -257, -17),
12115           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 2,-5, 0, 0, 0, -491, 128,    0,   0),
12116           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0,-2, 5, 0, 0, 0,-3084,5123, 2735,1647),
12117           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0,-2, 5, 0, 0, 1,-1444,2409,-1286,-771),
12118 
12119        /* 21-30 */
12120           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0,-2, 5, 0, 0, 2,   11, -24,  -11,  -9),
12121           new PlanetaryNutModel( 2,-1,-1, 0, 0,  0,  3, -7, 0, 0, 0, 0, 0,   26,  -9,    0,   0),
12122           new PlanetaryNutModel( 1, 0,-2, 0, 0, 19,-21,  3, 0, 0, 0, 0, 0,  103, -60,    0,   0),
12123           new PlanetaryNutModel( 0, 1,-1, 1, 0,  2, -4,  0,-3, 0, 0, 0, 0,    0, -13,   -7,   0),
12124           new PlanetaryNutModel( 1, 0,-1, 1, 0,  0, -1,  0, 2, 0, 0, 0, 0,  -26, -29,  -16,  14),
12125           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0,-4,10, 0, 0, 0,    9, -27,  -14,  -5),
12126           new PlanetaryNutModel(-2, 0, 2, 1, 0,  0,  2,  0, 0,-5, 0, 0, 0,   12,   0,    0,  -6),
12127           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -7,  4, 0, 0, 0, 0, 0,   -7,   0,    0,   0),
12128           new PlanetaryNutModel( 0,-1, 1, 0, 0,  0,  1,  0, 1,-1, 0, 0, 0,    0,  24,    0,   0),
12129           new PlanetaryNutModel(-2, 0, 2, 1, 0,  0,  2,  0,-2, 0, 0, 0, 0,  284,   0,    0,-151),
12130 
12131        /* 31-40 */
12132           new PlanetaryNutModel(-1, 0, 0, 0, 0, 18,-16,  0, 0, 0, 0, 0, 0,  226, 101,    0,   0),
12133           new PlanetaryNutModel(-2, 1, 1, 2, 0,  0,  1,  0,-2, 0, 0, 0, 0,    0,  -8,   -2,   0),
12134           new PlanetaryNutModel(-1, 1,-1, 1, 0, 18,-17,  0, 0, 0, 0, 0, 0,    0,  -6,   -3,   0),
12135           new PlanetaryNutModel(-1, 0, 1, 1, 0,  0,  2, -2, 0, 0, 0, 0, 0,    5,   0,    0,  -3),
12136           new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 13,  0, 0, 0, 0, 0, 2,  -41, 175,   76,  17),
12137           new PlanetaryNutModel( 0, 2,-2, 2, 0, -8, 11,  0, 0, 0, 0, 0, 0,    0,  15,    6,   0),
12138           new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 13,  0, 0, 0, 0, 0, 1,  425, 212, -133, 269),
12139           new PlanetaryNutModel( 0, 1,-1, 1, 0, -8, 12,  0, 0, 0, 0, 0, 0, 1200, 598,  319,-641),
12140           new PlanetaryNutModel( 0, 0, 0, 0, 0,  8,-13,  0, 0, 0, 0, 0, 0,  235, 334,    0,   0),
12141           new PlanetaryNutModel( 0, 1,-1, 1, 0,  8,-14,  0, 0, 0, 0, 0, 0,   11, -12,   -7,  -6),
12142 
12143        /* 41-50 */
12144           new PlanetaryNutModel( 0, 0, 0, 0, 0,  8,-13,  0, 0, 0, 0, 0, 1,    5,  -6,    3,   3),
12145           new PlanetaryNutModel(-2, 0, 2, 1, 0,  0,  2,  0,-4, 5, 0, 0, 0,   -5,   0,    0,   3),
12146           new PlanetaryNutModel(-2, 0, 2, 2, 0,  3, -3,  0, 0, 0, 0, 0, 0,    6,   0,    0,  -3),
12147           new PlanetaryNutModel(-2, 0, 2, 0, 0,  0,  2,  0,-3, 1, 0, 0, 0,   15,   0,    0,   0),
12148           new PlanetaryNutModel( 0, 0, 0, 1, 0,  3, -5,  0, 2, 0, 0, 0, 0,   13,   0,    0,  -7),
12149           new PlanetaryNutModel(-2, 0, 2, 0, 0,  0,  2,  0,-4, 3, 0, 0, 0,   -6,  -9,    0,   0),
12150           new PlanetaryNutModel( 0,-1, 1, 0, 0,  0,  0,  2, 0, 0, 0, 0, 0,  266, -78,    0,   0),
12151           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0, -1,  2, 0, 0, 0, 0, 0, -460,-435, -232, 246),
12152           new PlanetaryNutModel( 0, 1,-1, 2, 0,  0, -2,  2, 0, 0, 0, 0, 0,    0,  15,    7,   0),
12153           new PlanetaryNutModel(-1, 1, 0, 1, 0,  3, -5,  0, 0, 0, 0, 0, 0,   -3,   0,    0,   2),
12154 
12155        /* 51-60 */
12156           new PlanetaryNutModel(-1, 0, 1, 0, 0,  3, -4,  0, 0, 0, 0, 0, 0,    0, 131,    0,   0),
12157           new PlanetaryNutModel(-2, 0, 2, 0, 0,  0,  2,  0,-2,-2, 0, 0, 0,    4,   0,    0,   0),
12158           new PlanetaryNutModel(-2, 2, 0, 2, 0,  0, -5,  9, 0, 0, 0, 0, 0,    0,   3,    0,   0),
12159           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0, 0, 0,-1, 0, 0,    0,   4,    2,   0),
12160           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0, 0, 1, 0, 0,    0,   3,    0,   0),
12161           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0, 0, 0, 0, 2, 0,  -17, -19,  -10,   9),
12162           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0, 0, 0, 2, 1,   -9, -11,    6,  -5),
12163           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0, 0, 0, 2, 2,   -6,   0,    0,   3),
12164           new PlanetaryNutModel(-1, 0, 1, 0, 0,  0,  3, -4, 0, 0, 0, 0, 0,  -16,   8,    0,   0),
12165           new PlanetaryNutModel( 0,-1, 1, 0, 0,  0,  1,  0, 0, 2, 0, 0, 0,    0,   3,    0,   0),
12166 
12167        /* 61-70 */
12168           new PlanetaryNutModel( 0, 1,-1, 2, 0,  0, -1,  0, 0, 2, 0, 0, 0,   11,  24,   11,  -5),
12169           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0, -9, 17, 0, 0, 0, 0, 0,   -3,  -4,   -2,   1),
12170           new PlanetaryNutModel( 0, 0, 0, 2, 0, -3,  5,  0, 0, 0, 0, 0, 0,    3,   0,    0,  -1),
12171           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0,-1, 2, 0, 0, 0,    0,  -8,   -4,   0),
12172           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 1,-2, 0, 0, 0,    0,   3,    0,   0),
12173           new PlanetaryNutModel( 1, 0,-2, 0, 0, 17,-16,  0,-2, 0, 0, 0, 0,    0,   5,    0,   0),
12174           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0, 1,-3, 0, 0, 0,    0,   3,    2,   0),
12175           new PlanetaryNutModel(-2, 0, 2, 1, 0,  0,  5, -6, 0, 0, 0, 0, 0,   -6,   4,    2,   3),
12176           new PlanetaryNutModel( 0,-2, 2, 0, 0,  0,  9,-13, 0, 0, 0, 0, 0,   -3,  -5,    0,   0),
12177           new PlanetaryNutModel( 0, 1,-1, 2, 0,  0, -1,  0, 0, 1, 0, 0, 0,   -5,   0,    0,   2),
12178 
12179        /* 71-80 */
12180           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0,  0,  0, 0, 1, 0, 0, 0,    4,  24,   13,  -2),
12181           new PlanetaryNutModel( 0,-1, 1, 0, 0,  0,  1,  0, 0, 1, 0, 0, 0,  -42,  20,    0,   0),
12182           new PlanetaryNutModel( 0,-2, 2, 0, 0,  5, -6,  0, 0, 0, 0, 0, 0,  -10, 233,    0,   0),
12183           new PlanetaryNutModel( 0,-1, 1, 1, 0,  5, -7,  0, 0, 0, 0, 0, 0,   -3,   0,    0,   1),
12184           new PlanetaryNutModel(-2, 0, 2, 0, 0,  6, -8,  0, 0, 0, 0, 0, 0,   78, -18,    0,   0),
12185           new PlanetaryNutModel( 2, 1,-3, 1, 0, -6,  7,  0, 0, 0, 0, 0, 0,    0,   3,    1,   0),
12186           new PlanetaryNutModel( 0, 0, 0, 2, 0,  0,  0,  0, 1, 0, 0, 0, 0,    0,  -3,   -1,   0),
12187           new PlanetaryNutModel( 0,-1, 1, 1, 0,  0,  1,  0, 1, 0, 0, 0, 0,    0,  -4,   -2,   1),
12188           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0, 0, 0, 2, 0, 0,    0,  -8,   -4,  -1),
12189           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0, 0, 2, 0, 1,    0,  -5,    3,   0),
12190 
12191        /* 81-90 */
12192           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0, 0, 2, 0, 2,   -7,   0,    0,   3),
12193           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -8, 15, 0, 0, 0, 0, 2,  -14,   8,    3,   6),
12194           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -8, 15, 0, 0, 0, 0, 1,    0,   8,   -4,   0),
12195           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -9, 15, 0, 0, 0, 0, 0,    0,  19,   10,   0),
12196           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  8,-15, 0, 0, 0, 0, 0,   45, -22,    0,   0),
12197           new PlanetaryNutModel( 1,-1,-1, 0, 0,  0,  8,-15, 0, 0, 0, 0, 0,   -3,   0,    0,   0),
12198           new PlanetaryNutModel( 2, 0,-2, 0, 0,  2, -5,  0, 0, 0, 0, 0, 0,    0,  -3,    0,   0),
12199           new PlanetaryNutModel(-2, 0, 2, 0, 0,  0,  2,  0,-5, 5, 0, 0, 0,    0,   3,    0,   0),
12200           new PlanetaryNutModel( 2, 0,-2, 1, 0,  0, -6,  8, 0, 0, 0, 0, 0,    3,   5,    3,  -2),
12201           new PlanetaryNutModel( 2, 0,-2, 1, 0,  0, -2,  0, 3, 0, 0, 0, 0,   89, -16,   -9, -48),
12202 
12203        /* 91-100 */
12204           new PlanetaryNutModel(-2, 1, 1, 0, 0,  0,  1,  0,-3, 0, 0, 0, 0,    0,   3,    0,   0),
12205           new PlanetaryNutModel(-2, 1, 1, 1, 0,  0,  1,  0,-3, 0, 0, 0, 0,   -3,   7,    4,   2),
12206           new PlanetaryNutModel(-2, 0, 2, 0, 0,  0,  2,  0,-3, 0, 0, 0, 0, -349, -62,    0,   0),
12207           new PlanetaryNutModel(-2, 0, 2, 0, 0,  0,  6, -8, 0, 0, 0, 0, 0,  -15,  22,    0,   0),
12208           new PlanetaryNutModel(-2, 0, 2, 0, 0,  0,  2,  0,-1,-5, 0, 0, 0,   -3,   0,    0,   0),
12209           new PlanetaryNutModel(-1, 0, 1, 0, 0,  0,  1,  0,-1, 0, 0, 0, 0,  -53,   0,    0,   0),
12210           new PlanetaryNutModel(-1, 1, 1, 1, 0,-20, 20,  0, 0, 0, 0, 0, 0,    5,   0,    0,  -3),
12211           new PlanetaryNutModel( 1, 0,-2, 0, 0, 20,-21,  0, 0, 0, 0, 0, 0,    0,  -8,    0,   0),
12212           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0,  8,-15, 0, 0, 0, 0, 0,   15,  -7,   -4,  -8),
12213           new PlanetaryNutModel( 0, 2,-2, 1, 0,  0,-10, 15, 0, 0, 0, 0, 0,   -3,   0,    0,   1),
12214 
12215        /* 101-110 */
12216           new PlanetaryNutModel( 0,-1, 1, 0, 0,  0,  1,  0, 1, 0, 0, 0, 0,  -21, -78,    0,   0),
12217           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0,  0,  0, 1, 0, 0, 0, 0,   20, -70,  -37, -11),
12218           new PlanetaryNutModel( 0, 1,-1, 2, 0,  0, -1,  0, 1, 0, 0, 0, 0,    0,   6,    3,   0),
12219           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0,-2, 4, 0, 0, 0,    5,   3,    2,  -2),
12220           new PlanetaryNutModel( 2, 0,-2, 1, 0, -6,  8,  0, 0, 0, 0, 0, 0,  -17,  -4,   -2,   9),
12221           new PlanetaryNutModel( 0,-2, 2, 1, 0,  5, -6,  0, 0, 0, 0, 0, 0,    0,   6,    3,   0),
12222           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0,-1, 0, 0, 1,   32,  15,   -8,  17),
12223           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0, 0,-1, 0, 0, 0,  174,  84,   45, -93),
12224           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0, 1, 0, 0, 0,   11,  56,    0,   0),
12225           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0, 0, 1, 0, 0, 0,  -66, -12,   -6,  35),
12226 
12227        /* 111-120 */
12228           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0, 1, 0, 0, 1,   47,   8,    4, -25),
12229           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0, 1, 0, 0, 2,    0,   8,    4,   0),
12230           new PlanetaryNutModel( 0, 2,-2, 1, 0,  0, -9, 13, 0, 0, 0, 0, 0,   10, -22,  -12,  -5),
12231           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0,  7,-13, 0, 0, 0, 0, 0,   -3,   0,    0,   2),
12232           new PlanetaryNutModel(-2, 0, 2, 0, 0,  0,  5, -6, 0, 0, 0, 0, 0,  -24,  12,    0,   0),
12233           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  9,-17, 0, 0, 0, 0, 0,    5,  -6,    0,   0),
12234           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -9, 17, 0, 0, 0, 0, 2,    3,   0,    0,  -2),
12235           new PlanetaryNutModel( 1, 0,-1, 1, 0,  0, -3,  4, 0, 0, 0, 0, 0,    4,   3,    1,  -2),
12236           new PlanetaryNutModel( 1, 0,-1, 1, 0, -3,  4,  0, 0, 0, 0, 0, 0,    0,  29,   15,   0),
12237           new PlanetaryNutModel( 0, 0, 0, 2, 0,  0, -1,  2, 0, 0, 0, 0, 0,   -5,  -4,   -2,   2),
12238 
12239        /* 121-130 */
12240           new PlanetaryNutModel( 0,-1, 1, 1, 0,  0,  0,  2, 0, 0, 0, 0, 0,    8,  -3,   -1,  -5),
12241           new PlanetaryNutModel( 0,-2, 2, 0, 1,  0, -2,  0, 0, 0, 0, 0, 0,    0,  -3,    0,   0),
12242           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -5,  0, 2, 0, 0, 0, 0,   10,   0,    0,   0),
12243           new PlanetaryNutModel(-2, 0, 2, 1, 0,  0,  2,  0,-3, 1, 0, 0, 0,    3,   0,    0,  -2),
12244           new PlanetaryNutModel(-2, 0, 2, 1, 0,  3, -3,  0, 0, 0, 0, 0, 0,   -5,   0,    0,   3),
12245           new PlanetaryNutModel( 0, 0, 0, 1, 0,  8,-13,  0, 0, 0, 0, 0, 0,   46,  66,   35, -25),
12246           new PlanetaryNutModel( 0,-1, 1, 0, 0,  8,-12,  0, 0, 0, 0, 0, 0,  -14,   7,    0,   0),
12247           new PlanetaryNutModel( 0, 2,-2, 1, 0, -8, 11,  0, 0, 0, 0, 0, 0,    0,   3,    2,   0),
12248           new PlanetaryNutModel(-1, 0, 1, 0, 0,  0,  2, -2, 0, 0, 0, 0, 0,   -5,   0,    0,   0),
12249           new PlanetaryNutModel(-1, 0, 0, 1, 0, 18,-16,  0, 0, 0, 0, 0, 0,  -68, -34,  -18,  36),
12250 
12251        /* 131-140 */
12252           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0,-1, 1, 0, 0, 0,    0,  14,    7,   0),
12253           new PlanetaryNutModel( 0, 0, 0, 1, 0,  3, -7,  4, 0, 0, 0, 0, 0,   10,  -6,   -3,  -5),
12254           new PlanetaryNutModel(-2, 1, 1, 1, 0,  0, -3,  7, 0, 0, 0, 0, 0,   -5,  -4,   -2,   3),
12255           new PlanetaryNutModel( 0, 1,-1, 2, 0,  0, -1,  0,-2, 5, 0, 0, 0,   -3,   5,    2,   1),
12256           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0,  0,  0,-2, 5, 0, 0, 0,   76,  17,    9, -41),
12257           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0, -4,  8,-3, 0, 0, 0, 0,   84, 298,  159, -45),
12258           new PlanetaryNutModel( 1, 0, 0, 1, 0,-10,  3,  0, 0, 0, 0, 0, 0,    3,   0,    0,  -1),
12259           new PlanetaryNutModel( 0, 2,-2, 1, 0,  0, -2,  0, 0, 0, 0, 0, 0,   -3,   0,    0,   2),
12260           new PlanetaryNutModel(-1, 0, 0, 1, 0, 10, -3,  0, 0, 0, 0, 0, 0,   -3,   0,    0,   1),
12261           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0,  4, -8, 3, 0, 0, 0, 0,  -82, 292,  156,  44),
12262 
12263        /* 141-150 */
12264           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0,  0,  0, 2,-5, 0, 0, 0,  -73,  17,    9,  39),
12265           new PlanetaryNutModel( 0,-1, 1, 0, 0,  0,  1,  0, 2,-5, 0, 0, 0,   -9, -16,    0,   0),
12266           new PlanetaryNutModel( 2,-1,-1, 1, 0,  0,  3, -7, 0, 0, 0, 0, 0,    3,   0,   -1,  -2),
12267           new PlanetaryNutModel(-2, 0, 2, 0, 0,  0,  2,  0, 0,-5, 0, 0, 0,   -3,   0,    0,   0),
12268           new PlanetaryNutModel( 0, 0, 0, 1, 0, -3,  7, -4, 0, 0, 0, 0, 0,   -9,  -5,   -3,   5),
12269           new PlanetaryNutModel(-2, 0, 2, 0, 0,  0,  2,  0,-2, 0, 0, 0, 0, -439,   0,    0,   0),
12270           new PlanetaryNutModel( 1, 0, 0, 1, 0,-18, 16,  0, 0, 0, 0, 0, 0,   57, -28,  -15, -30),
12271           new PlanetaryNutModel(-2, 1, 1, 1, 0,  0,  1,  0,-2, 0, 0, 0, 0,    0,  -6,   -3,   0),
12272           new PlanetaryNutModel( 0, 1,-1, 2, 0, -8, 12,  0, 0, 0, 0, 0, 0,   -4,   0,    0,   2),
12273           new PlanetaryNutModel( 0, 0, 0, 1, 0, -8, 13,  0, 0, 0, 0, 0, 0,  -40,  57,   30,  21),
12274 
12275        /* 151-160 */
12276           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1, -2, 0, 0, 0, 0, 1,   23,   7,    3, -13),
12277           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0,  0, -2, 0, 0, 0, 0, 0,  273,  80,   43,-146),
12278           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1, -2, 0, 0, 0, 0, 0, -449, 430,    0,   0),
12279           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -2,  2, 0, 0, 0, 0, 0,   -8, -47,  -25,   4),
12280           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -1,  2, 0, 0, 0, 0, 1,    6,  47,   25,  -3),
12281           new PlanetaryNutModel(-1, 0, 1, 1, 0,  3, -4,  0, 0, 0, 0, 0, 0,    0,  23,   13,   0),
12282           new PlanetaryNutModel(-1, 0, 1, 1, 0,  0,  3, -4, 0, 0, 0, 0, 0,   -3,   0,    0,   2),
12283           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0, 0,-2, 0, 0, 0,    3,  -4,   -2,  -2),
12284           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0, 0, 2, 0, 0, 0,  -48,-110,  -59,  26),
12285           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0, 2, 0, 0, 1,   51, 114,   61, -27),
12286 
12287        /* 161-170 */
12288           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0, 2, 0, 0, 2, -133,   0,    0,  57),
12289           new PlanetaryNutModel( 0, 1,-1, 0, 0,  3, -6,  0, 0, 0, 0, 0, 0,    0,   4,    0,   0),
12290           new PlanetaryNutModel( 0, 0, 0, 1, 0, -3,  5,  0, 0, 0, 0, 0, 0,  -21,  -6,   -3,  11),
12291           new PlanetaryNutModel( 0, 1,-1, 2, 0, -3,  4,  0, 0, 0, 0, 0, 0,    0,  -3,   -1,   0),
12292           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0, -2,  4, 0, 0, 0, 0, 0,  -11, -21,  -11,   6),
12293           new PlanetaryNutModel( 0, 2,-2, 1, 0, -5,  6,  0, 0, 0, 0, 0, 0,  -18,-436, -233,   9),
12294           new PlanetaryNutModel( 0,-1, 1, 0, 0,  5, -7,  0, 0, 0, 0, 0, 0,   35,  -7,    0,   0),
12295           new PlanetaryNutModel( 0, 0, 0, 1, 0,  5, -8,  0, 0, 0, 0, 0, 0,    0,   5,    3,   0),
12296           new PlanetaryNutModel(-2, 0, 2, 1, 0,  6, -8,  0, 0, 0, 0, 0, 0,   11,  -3,   -1,  -6),
12297           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0, -8, 15, 0, 0, 0, 0, 0,   -5,  -3,   -1,   3),
12298 
12299        /* 171-180 */
12300           new PlanetaryNutModel(-2, 0, 2, 1, 0,  0,  2,  0,-3, 0, 0, 0, 0,  -53,  -9,   -5,  28),
12301           new PlanetaryNutModel(-2, 0, 2, 1, 0,  0,  6, -8, 0, 0, 0, 0, 0,    0,   3,    2,   1),
12302           new PlanetaryNutModel( 1, 0,-1, 1, 0,  0, -1,  0, 1, 0, 0, 0, 0,    4,   0,    0,  -2),
12303           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 3,-5, 0, 0, 0,    0,  -4,    0,   0),
12304           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0,-1, 0, 0, 0, 0,  -50, 194,  103,  27),
12305           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0,-1, 0, 0, 0, 1,  -13,  52,   28,   7),
12306           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 1, 0, 0, 0, 0,  -91, 248,    0,   0),
12307           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 1, 0, 0, 0, 1,    6,  49,   26,  -3),
12308           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0, 1, 0, 0, 0, 0,   -6, -47,  -25,   3),
12309           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 1, 0, 0, 0, 1,    0,   5,    3,   0),
12310 
12311        /* 181-190 */
12312           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 1, 0, 0, 0, 2,   52,  23,   10, -23),
12313           new PlanetaryNutModel( 0, 1,-1, 2, 0,  0, -1,  0, 0,-1, 0, 0, 0,   -3,   0,    0,   1),
12314           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0,  0,  0, 0,-1, 0, 0, 0,    0,   5,    3,   0),
12315           new PlanetaryNutModel( 0,-1, 1, 0, 0,  0,  1,  0, 0,-1, 0, 0, 0,   -4,   0,    0,   0),
12316           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -7, 13, 0, 0, 0, 0, 2,   -4,   8,    3,   2),
12317           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  7,-13, 0, 0, 0, 0, 0,   10,   0,    0,   0),
12318           new PlanetaryNutModel( 2, 0,-2, 1, 0,  0, -5,  6, 0, 0, 0, 0, 0,    3,   0,    0,  -2),
12319           new PlanetaryNutModel( 0, 2,-2, 1, 0,  0, -8, 11, 0, 0, 0, 0, 0,    0,   8,    4,   0),
12320           new PlanetaryNutModel( 0, 2,-2, 1,-1,  0,  2,  0, 0, 0, 0, 0, 0,    0,   8,    4,   1),
12321           new PlanetaryNutModel(-2, 0, 2, 0, 0,  0,  4, -4, 0, 0, 0, 0, 0,   -4,   0,    0,   0),
12322 
12323        /* 191-200 */
12324           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 2,-2, 0, 0, 0,   -4,   0,    0,   0),
12325           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0, 0, 3, 0, 0, 0,   -8,   4,    2,   4),
12326           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0, 3, 0, 0, 1,    8,  -4,   -2,  -4),
12327           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0, 3, 0, 0, 2,    0,  15,    7,   0),
12328           new PlanetaryNutModel(-2, 0, 2, 0, 0,  3, -3,  0, 0, 0, 0, 0, 0, -138,   0,    0,   0),
12329           new PlanetaryNutModel( 0, 0, 0, 2, 0,  0, -4,  8,-3, 0, 0, 0, 0,    0,  -7,   -3,   0),
12330           new PlanetaryNutModel( 0, 0, 0, 2, 0,  0,  4, -8, 3, 0, 0, 0, 0,    0,  -7,   -3,   0),
12331           new PlanetaryNutModel( 2, 0,-2, 1, 0,  0, -2,  0, 2, 0, 0, 0, 0,   54,   0,    0, -29),
12332           new PlanetaryNutModel( 0, 1,-1, 2, 0,  0, -1,  0, 2, 0, 0, 0, 0,    0,  10,    4,   0),
12333           new PlanetaryNutModel( 0, 1,-1, 2, 0,  0,  0, -2, 0, 0, 0, 0, 0,   -7,   0,    0,   3),
12334 
12335        /* 201-210 */
12336           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0,  1, -2, 0, 0, 0, 0, 0,  -37,  35,   19,  20),
12337           new PlanetaryNutModel( 0,-1, 1, 0, 0,  0,  2, -2, 0, 0, 0, 0, 0,    0,   4,    0,   0),
12338           new PlanetaryNutModel( 0,-1, 1, 0, 0,  0,  1,  0, 0,-2, 0, 0, 0,   -4,   9,    0,   0),
12339           new PlanetaryNutModel( 0, 2,-2, 1, 0,  0, -2,  0, 0, 2, 0, 0, 0,    8,   0,    0,  -4),
12340           new PlanetaryNutModel( 0, 1,-1, 1, 0,  3, -6,  0, 0, 0, 0, 0, 0,   -9, -14,   -8,   5),
12341           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -5,  0, 0, 0, 0, 0, 1,   -3,  -9,   -5,   3),
12342           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -5,  0, 0, 0, 0, 0, 0, -145,  47,    0,   0),
12343           new PlanetaryNutModel( 0, 1,-1, 1, 0, -3,  4,  0, 0, 0, 0, 0, 0,  -10,  40,   21,   5),
12344           new PlanetaryNutModel( 0, 0, 0, 0, 0, -3,  5,  0, 0, 0, 0, 0, 1,   11, -49,  -26,  -7),
12345           new PlanetaryNutModel( 0, 0, 0, 0, 0, -3,  5,  0, 0, 0, 0, 0, 2,-2150,   0,    0, 932),
12346 
12347        /* 211-220 */
12348           new PlanetaryNutModel( 0, 2,-2, 2, 0, -3,  3,  0, 0, 0, 0, 0, 0,  -12,   0,    0,   5),
12349           new PlanetaryNutModel( 0, 0, 0, 0, 0, -3,  5,  0, 0, 0, 0, 0, 2,   85,   0,    0, -37),
12350           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2, -4, 0, 0, 0, 0, 1,    4,   0,    0,  -2),
12351           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0,  1, -4, 0, 0, 0, 0, 0,    3,   0,    0,  -2),
12352           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2, -4, 0, 0, 0, 0, 0,  -86, 153,    0,   0),
12353           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -2,  4, 0, 0, 0, 0, 1,   -6,   9,    5,   3),
12354           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -3,  4, 0, 0, 0, 0, 0,    9, -13,   -7,  -5),
12355           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -2,  4, 0, 0, 0, 0, 1,   -8,  12,    6,   4),
12356           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -2,  4, 0, 0, 0, 0, 2,  -51,   0,    0,  22),
12357           new PlanetaryNutModel( 0, 0, 0, 0, 0, -5,  8,  0, 0, 0, 0, 0, 2,  -11,-268, -116,   5),
12358 
12359        /* 221-230 */
12360           new PlanetaryNutModel( 0, 2,-2, 2, 0, -5,  6,  0, 0, 0, 0, 0, 0,    0,  12,    5,   0),
12361           new PlanetaryNutModel( 0, 0, 0, 0, 0, -5,  8,  0, 0, 0, 0, 0, 2,    0,   7,    3,   0),
12362           new PlanetaryNutModel( 0, 0, 0, 0, 0, -5,  8,  0, 0, 0, 0, 0, 1,   31,   6,    3, -17),
12363           new PlanetaryNutModel( 0, 1,-1, 1, 0, -5,  7,  0, 0, 0, 0, 0, 0,  140,  27,   14, -75),
12364           new PlanetaryNutModel( 0, 0, 0, 0, 0, -5,  8,  0, 0, 0, 0, 0, 1,   57,  11,    6, -30),
12365           new PlanetaryNutModel( 0, 0, 0, 0, 0,  5, -8,  0, 0, 0, 0, 0, 0,  -14, -39,    0,   0),
12366           new PlanetaryNutModel( 0, 1,-1, 2, 0,  0, -1,  0,-1, 0, 0, 0, 0,    0,  -6,   -2,   0),
12367           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0,  0,  0,-1, 0, 0, 0, 0,    4,  15,    8,  -2),
12368           new PlanetaryNutModel( 0,-1, 1, 0, 0,  0,  1,  0,-1, 0, 0, 0, 0,    0,   4,    0,   0),
12369           new PlanetaryNutModel( 0, 2,-2, 1, 0,  0, -2,  0, 1, 0, 0, 0, 0,   -3,   0,    0,   1),
12370 
12371        /* 231-240 */
12372           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -6, 11, 0, 0, 0, 0, 2,    0,  11,    5,   0),
12373           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6,-11, 0, 0, 0, 0, 0,    9,   6,    0,   0),
12374           new PlanetaryNutModel( 0, 0, 0, 0,-1,  0,  4,  0, 0, 0, 0, 0, 2,   -4,  10,    4,   2),
12375           new PlanetaryNutModel( 0, 0, 0, 0, 1,  0, -4,  0, 0, 0, 0, 0, 0,    5,   3,    0,   0),
12376           new PlanetaryNutModel( 2, 0,-2, 1, 0, -3,  3,  0, 0, 0, 0, 0, 0,   16,   0,    0,  -9),
12377           new PlanetaryNutModel(-2, 0, 2, 0, 0,  0,  2,  0, 0,-2, 0, 0, 0,   -3,   0,    0,   0),
12378           new PlanetaryNutModel( 0, 2,-2, 1, 0,  0, -7,  9, 0, 0, 0, 0, 0,    0,   3,    2,  -1),
12379           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 4,-5, 0, 0, 2,    7,   0,    0,  -3),
12380           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 2, 0, 0, 0, 0,  -25,  22,    0,   0),
12381           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 2, 0, 0, 0, 1,   42, 223,  119, -22),
12382 
12383        /* 241-250 */
12384           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0, 2, 0, 0, 0, 0,  -27,-143,  -77,  14),
12385           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 2, 0, 0, 0, 1,    9,  49,   26,  -5),
12386           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 2, 0, 0, 0, 2,-1166,   0,    0, 505),
12387           new PlanetaryNutModel( 0, 2,-2, 2, 0,  0, -2,  0, 2, 0, 0, 0, 0,   -5,   0,    0,   2),
12388           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0, 5, 0, 0, 2,   -6,   0,    0,   3),
12389           new PlanetaryNutModel( 0, 0, 0, 1, 0,  3, -5,  0, 0, 0, 0, 0, 0,   -8,   0,    1,   4),
12390           new PlanetaryNutModel( 0,-1, 1, 0, 0,  3, -4,  0, 0, 0, 0, 0, 0,    0,  -4,    0,   0),
12391           new PlanetaryNutModel( 0, 2,-2, 1, 0, -3,  3,  0, 0, 0, 0, 0, 0,  117,   0,    0, -63),
12392           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0,  2, -4, 0, 0, 0, 0, 0,   -4,   8,    4,   2),
12393           new PlanetaryNutModel( 0, 2,-2, 1, 0,  0, -4,  4, 0, 0, 0, 0, 0,    3,   0,    0,  -2),
12394 
12395        /* 251-260 */
12396           new PlanetaryNutModel( 0, 1,-1, 2, 0, -5,  7,  0, 0, 0, 0, 0, 0,   -5,   0,    0,   2),
12397           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3, -6, 0, 0, 0, 0, 0,    0,  31,    0,   0),
12398           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -3,  6, 0, 0, 0, 0, 1,   -5,   0,    1,   3),
12399           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -4,  6, 0, 0, 0, 0, 0,    4,   0,    0,  -2),
12400           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -3,  6, 0, 0, 0, 0, 1,   -4,   0,    0,   2),
12401           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -3,  6, 0, 0, 0, 0, 2,  -24, -13,   -6,  10),
12402           new PlanetaryNutModel( 0,-1, 1, 0, 0,  2, -2,  0, 0, 0, 0, 0, 0,    3,   0,    0,   0),
12403           new PlanetaryNutModel( 0, 0, 0, 1, 0,  2, -3,  0, 0, 0, 0, 0, 0,    0, -32,  -17,   0),
12404           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -5,  9, 0, 0, 0, 0, 2,    8,  12,    5,  -3),
12405           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -5,  9, 0, 0, 0, 0, 1,    3,   0,    0,  -1),
12406 
12407        /* 261-270 */
12408           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  5, -9, 0, 0, 0, 0, 0,    7,  13,    0,   0),
12409           new PlanetaryNutModel( 0,-1, 1, 0, 0,  0,  1,  0,-2, 0, 0, 0, 0,   -3,  16,    0,   0),
12410           new PlanetaryNutModel( 0, 2,-2, 1, 0,  0, -2,  0, 2, 0, 0, 0, 0,   50,   0,    0, -27),
12411           new PlanetaryNutModel(-2, 1, 1, 1, 0,  0,  1,  0, 0, 0, 0, 0, 0,    0,  -5,   -3,   0),
12412           new PlanetaryNutModel( 0,-2, 2, 0, 0,  3, -3,  0, 0, 0, 0, 0, 0,   13,   0,    0,   0),
12413           new PlanetaryNutModel( 0, 0, 0, 0, 0, -6, 10,  0, 0, 0, 0, 0, 1,    0,   5,    3,   1),
12414           new PlanetaryNutModel( 0, 0, 0, 0, 0, -6, 10,  0, 0, 0, 0, 0, 2,   24,   5,    2, -11),
12415           new PlanetaryNutModel( 0, 0, 0, 0, 0, -2,  3,  0, 0, 0, 0, 0, 2,    5, -11,   -5,  -2),
12416           new PlanetaryNutModel( 0, 0, 0, 0, 0, -2,  3,  0, 0, 0, 0, 0, 1,   30,  -3,   -2, -16),
12417           new PlanetaryNutModel( 0, 1,-1, 1, 0, -2,  2,  0, 0, 0, 0, 0, 0,   18,   0,    0,  -9),
12418 
12419        /* 271-280 */
12420           new PlanetaryNutModel( 0, 0, 0, 0, 0,  2, -3,  0, 0, 0, 0, 0, 0,    8, 614,    0,   0),
12421           new PlanetaryNutModel( 0, 0, 0, 0, 0,  2, -3,  0, 0, 0, 0, 0, 1,    3,  -3,   -1,  -2),
12422           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 3, 0, 0, 0, 1,    6,  17,    9,  -3),
12423           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0, -1,  0, 3, 0, 0, 0, 0,   -3,  -9,   -5,   2),
12424           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 3, 0, 0, 0, 1,    0,   6,    3,  -1),
12425           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 3, 0, 0, 0, 2, -127,  21,    9,  55),
12426           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4, -8, 0, 0, 0, 0, 0,    3,   5,    0,   0),
12427           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -4,  8, 0, 0, 0, 0, 2,   -6, -10,   -4,   3),
12428           new PlanetaryNutModel( 0,-2, 2, 0, 0,  0,  2,  0,-2, 0, 0, 0, 0,    5,   0,    0,   0),
12429           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -4,  7, 0, 0, 0, 0, 2,   16,   9,    4,  -7),
12430 
12431        /* 281-290 */
12432           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -4,  7, 0, 0, 0, 0, 1,    3,   0,    0,  -2),
12433           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4, -7, 0, 0, 0, 0, 0,    0,  22,    0,   0),
12434           new PlanetaryNutModel( 0, 0, 0, 1, 0, -2,  3,  0, 0, 0, 0, 0, 0,    0,  19,   10,   0),
12435           new PlanetaryNutModel( 0, 2,-2, 1, 0,  0, -2,  0, 3, 0, 0, 0, 0,    7,   0,    0,  -4),
12436           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -5, 10, 0, 0, 0, 0, 2,    0,  -5,   -2,   0),
12437           new PlanetaryNutModel( 0, 0, 0, 1, 0, -1,  2,  0, 0, 0, 0, 0, 0,    0,   3,    1,   0),
12438           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 4, 0, 0, 0, 2,   -9,   3,    1,   4),
12439           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -3,  5, 0, 0, 0, 0, 2,   17,   0,    0,  -7),
12440           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -3,  5, 0, 0, 0, 0, 1,    0,  -3,   -2,  -1),
12441           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3, -5, 0, 0, 0, 0, 0,  -20,  34,    0,   0),
12442 
12443        /* 291-300 */
12444           new PlanetaryNutModel( 0, 0, 0, 0, 0,  1, -2,  0, 0, 0, 0, 0, 1,  -10,   0,    1,   5),
12445           new PlanetaryNutModel( 0, 1,-1, 1, 0,  1, -3,  0, 0, 0, 0, 0, 0,   -4,   0,    0,   2),
12446           new PlanetaryNutModel( 0, 0, 0, 0, 0,  1, -2,  0, 0, 0, 0, 0, 0,   22, -87,    0,   0),
12447           new PlanetaryNutModel( 0, 0, 0, 0, 0, -1,  2,  0, 0, 0, 0, 0, 1,   -4,   0,    0,   2),
12448           new PlanetaryNutModel( 0, 0, 0, 0, 0, -1,  2,  0, 0, 0, 0, 0, 2,   -3,  -6,   -2,   1),
12449           new PlanetaryNutModel( 0, 0, 0, 0, 0, -7, 11,  0, 0, 0, 0, 0, 2,  -16,  -3,   -1,   7),
12450           new PlanetaryNutModel( 0, 0, 0, 0, 0, -7, 11,  0, 0, 0, 0, 0, 1,    0,  -3,   -2,   0),
12451           new PlanetaryNutModel( 0,-2, 2, 0, 0,  4, -4,  0, 0, 0, 0, 0, 0,    4,   0,    0,   0),
12452           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2, -3, 0, 0, 0, 0, 0,  -68,  39,    0,   0),
12453           new PlanetaryNutModel( 0, 2,-2, 1, 0, -4,  4,  0, 0, 0, 0, 0, 0,   27,   0,    0, -14),
12454 
12455        /* 301-310 */
12456           new PlanetaryNutModel( 0,-1, 1, 0, 0,  4, -5,  0, 0, 0, 0, 0, 0,    0,  -4,    0,   0),
12457           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1, -1, 0, 0, 0, 0, 0,  -25,   0,    0,   0),
12458           new PlanetaryNutModel( 0, 0, 0, 0, 0, -4,  7,  0, 0, 0, 0, 0, 1,  -12,  -3,   -2,   6),
12459           new PlanetaryNutModel( 0, 1,-1, 1, 0, -4,  6,  0, 0, 0, 0, 0, 0,    3,   0,    0,  -1),
12460           new PlanetaryNutModel( 0, 0, 0, 0, 0, -4,  7,  0, 0, 0, 0, 0, 2,    3,  66,   29,  -1),
12461           new PlanetaryNutModel( 0, 0, 0, 0, 0, -4,  6,  0, 0, 0, 0, 0, 2,  490,   0,    0,-213),
12462           new PlanetaryNutModel( 0, 0, 0, 0, 0, -4,  6,  0, 0, 0, 0, 0, 1,  -22,  93,   49,  12),
12463           new PlanetaryNutModel( 0, 1,-1, 1, 0, -4,  5,  0, 0, 0, 0, 0, 0,   -7,  28,   15,   4),
12464           new PlanetaryNutModel( 0, 0, 0, 0, 0, -4,  6,  0, 0, 0, 0, 0, 1,   -3,  13,    7,   2),
12465           new PlanetaryNutModel( 0, 0, 0, 0, 0,  4, -6,  0, 0, 0, 0, 0, 0,  -46,  14,    0,   0),
12466 
12467        /* 311-320 */
12468           new PlanetaryNutModel(-2, 0, 2, 0, 0,  2, -2,  0, 0, 0, 0, 0, 0,   -5,   0,    0,   0),
12469           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  1, 0, 0, 0, 0, 0,    2,   1,    0,   0),
12470           new PlanetaryNutModel( 0,-1, 1, 0, 0,  1,  0,  0, 0, 0, 0, 0, 0,    0,  -3,    0,   0),
12471           new PlanetaryNutModel( 0, 0, 0, 1, 0,  1, -1,  0, 0, 0, 0, 0, 0,  -28,   0,    0,  15),
12472           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -1,  0, 5, 0, 0, 0, 2,    5,   0,    0,  -2),
12473           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1, -3, 0, 0, 0, 0, 0,    0,   3,    0,   0),
12474           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -1,  3, 0, 0, 0, 0, 2,  -11,   0,    0,   5),
12475           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -7, 12, 0, 0, 0, 0, 2,    0,   3,    1,   0),
12476           new PlanetaryNutModel( 0, 0, 0, 0, 0, -1,  1,  0, 0, 0, 0, 0, 2,   -3,   0,    0,   1),
12477           new PlanetaryNutModel( 0, 0, 0, 0, 0, -1,  1,  0, 0, 0, 0, 0, 1,   25, 106,   57, -13),
12478 
12479        /* 321-330 */
12480           new PlanetaryNutModel( 0, 1,-1, 1, 0, -1,  0,  0, 0, 0, 0, 0, 0,    5,  21,   11,  -3),
12481           new PlanetaryNutModel( 0, 0, 0, 0, 0,  1, -1,  0, 0, 0, 0, 0, 0, 1485,   0,    0,   0),
12482           new PlanetaryNutModel( 0, 0, 0, 0, 0,  1, -1,  0, 0, 0, 0, 0, 1,   -7, -32,  -17,   4),
12483           new PlanetaryNutModel( 0, 1,-1, 1, 0,  1, -2,  0, 0, 0, 0, 0, 0,    0,   5,    3,   0),
12484           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -2,  5, 0, 0, 0, 0, 2,   -6,  -3,   -2,   3),
12485           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -1,  0, 4, 0, 0, 0, 2,   30,  -6,   -2, -13),
12486           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0,-4, 0, 0, 0, 0,   -4,   4,    0,   0),
12487           new PlanetaryNutModel( 0, 0, 0, 1, 0, -1,  1,  0, 0, 0, 0, 0, 0,  -19,   0,    0,  10),
12488           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -6, 10, 0, 0, 0, 0, 2,    0,   4,    2,  -1),
12489           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -6, 10, 0, 0, 0, 0, 0,    0,   3,    0,   0),
12490 
12491        /* 331-340 */
12492           new PlanetaryNutModel( 0, 2,-2, 1, 0,  0, -3,  0, 3, 0, 0, 0, 0,    4,   0,    0,  -2),
12493           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -3,  7, 0, 0, 0, 0, 2,    0,  -3,   -1,   0),
12494           new PlanetaryNutModel(-2, 0, 2, 0, 0,  4, -4,  0, 0, 0, 0, 0, 0,   -3,   0,    0,   0),
12495           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -5,  8, 0, 0, 0, 0, 2,    5,   3,    1,  -2),
12496           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  5, -8, 0, 0, 0, 0, 0,    0,  11,    0,   0),
12497           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -1,  0, 3, 0, 0, 0, 2,  118,   0,    0, -52),
12498           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -1,  0, 3, 0, 0, 0, 1,    0,  -5,   -3,   0),
12499           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0,-3, 0, 0, 0, 0,  -28,  36,    0,   0),
12500           new PlanetaryNutModel( 0, 0, 0, 0, 0,  2, -4,  0, 0, 0, 0, 0, 0,    5,  -5,    0,   0),
12501           new PlanetaryNutModel( 0, 0, 0, 0, 0, -2,  4,  0, 0, 0, 0, 0, 1,   14, -59,  -31,  -8),
12502 
12503        /* 341-350 */
12504           new PlanetaryNutModel( 0, 1,-1, 1, 0, -2,  3,  0, 0, 0, 0, 0, 0,    0,   9,    5,   1),
12505           new PlanetaryNutModel( 0, 0, 0, 0, 0, -2,  4,  0, 0, 0, 0, 0, 2, -458,   0,    0, 198),
12506           new PlanetaryNutModel( 0, 0, 0, 0, 0, -6,  9,  0, 0, 0, 0, 0, 2,    0, -45,  -20,   0),
12507           new PlanetaryNutModel( 0, 0, 0, 0, 0, -6,  9,  0, 0, 0, 0, 0, 1,    9,   0,    0,  -5),
12508           new PlanetaryNutModel( 0, 0, 0, 0, 0,  6, -9,  0, 0, 0, 0, 0, 0,    0,  -3,    0,   0),
12509           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0,  1,  0,-2, 0, 0, 0, 0,    0,  -4,   -2,  -1),
12510           new PlanetaryNutModel( 0, 2,-2, 1, 0, -2,  2,  0, 0, 0, 0, 0, 0,   11,   0,    0,  -6),
12511           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -4,  6, 0, 0, 0, 0, 2,    6,   0,    0,  -2),
12512           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4, -6, 0, 0, 0, 0, 0,  -16,  23,    0,   0),
12513           new PlanetaryNutModel( 0, 0, 0, 1, 0,  3, -4,  0, 0, 0, 0, 0, 0,    0,  -4,   -2,   0),
12514 
12515        /* 351-360 */
12516           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -1,  0, 2, 0, 0, 0, 2,   -5,   0,    0,   2),
12517           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0,-2, 0, 0, 0, 0, -166, 269,    0,   0),
12518           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0,  1,  0,-1, 0, 0, 0, 0,   15,   0,    0,  -8),
12519           new PlanetaryNutModel( 0, 0, 0, 0, 0, -5,  9,  0, 0, 0, 0, 0, 2,   10,   0,    0,  -4),
12520           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3, -4, 0, 0, 0, 0, 0,  -78,  45,    0,   0),
12521           new PlanetaryNutModel( 0, 0, 0, 0, 0, -3,  4,  0, 0, 0, 0, 0, 2,    0,  -5,   -2,   0),
12522           new PlanetaryNutModel( 0, 0, 0, 0, 0, -3,  4,  0, 0, 0, 0, 0, 1,    7,   0,    0,  -4),
12523           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -4,  0, 0, 0, 0, 0, 0,   -5, 328,    0,   0),
12524           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -4,  0, 0, 0, 0, 0, 1,    3,   0,    0,  -2),
12525           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0,  2, -2, 0, 0, 0, 0, 0,    5,   0,    0,  -2),
12526 
12527        /* 361-370 */
12528           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0, -1,  0, 2, 0, 0, 0, 0,    0,   3,    1,   0),
12529           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0, 0,-3, 0, 0, 0,   -3,   0,    0,   0),
12530           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0, 1,-5, 0, 0, 0,   -3,   0,    0,   0),
12531           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -1,  0, 1, 0, 0, 0, 1,    0,  -4,   -2,   0),
12532           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0,-1, 0, 0, 0, 0,-1223, -26,    0,   0),
12533           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0,-1, 0, 0, 0, 1,    0,   7,    3,   0),
12534           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0,-3, 5, 0, 0, 0,    3,   0,    0,   0),
12535           new PlanetaryNutModel( 0, 0, 0, 1, 0, -3,  4,  0, 0, 0, 0, 0, 0,    0,   3,    2,   0),
12536           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0, 0,-2, 0, 0, 0,   -6,  20,    0,   0),
12537           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2, -2, 0, 0, 0, 0, 0, -368,   0,    0,   0),
12538 
12539        /* 371-380 */
12540           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0, 0,-1, 0, 0, 0,  -75,   0,    0,   0),
12541           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0, -1,  0, 1, 0, 0, 0, 0,   11,   0,    0,  -6),
12542           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0, -2,  2, 0, 0, 0, 0, 0,    3,   0,    0,  -2),
12543           new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 14,  0, 0, 0, 0, 0, 2,   -3,   0,    0,   1),
12544           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0, 2,-5, 0, 0, 0,  -13, -30,    0,   0),
12545           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  5, -8, 3, 0, 0, 0, 0,   21,   3,    0,   0),
12546           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  5, -8, 3, 0, 0, 0, 2,   -3,   0,    0,   1),
12547           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -1,  0, 0, 0, 0, 0, 1,   -4,   0,    0,   2),
12548           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0, 0, 0, 0, 0, 0,    8, -27,    0,   0),
12549           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3, -8, 3, 0, 0, 0, 0,  -19, -11,    0,   0),
12550 
12551        /* 381-390 */
12552           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -3,  8,-3, 0, 0, 0, 2,   -4,   0,    0,   2),
12553           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0,-2, 5, 0, 0, 2,    0,   5,    2,   0),
12554           new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 12,  0, 0, 0, 0, 0, 2,   -6,   0,    0,   2),
12555           new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 12,  0, 0, 0, 0, 0, 0,   -8,   0,    0,   0),
12556           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0, 1,-2, 0, 0, 0,   -1,   0,    0,   0),
12557           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0, 0, 1, 0, 0, 2,  -14,   0,    0,   6),
12558           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  2, 0, 0, 0, 0, 0,    6,   0,    0,   0),
12559           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  2, 0, 0, 0, 0, 2,  -74,   0,    0,  32),
12560           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0, 0, 2, 0, 0, 2,    0,  -3,   -1,   0),
12561           new PlanetaryNutModel( 0, 2,-2, 1, 0, -5,  5,  0, 0, 0, 0, 0, 0,    4,   0,    0,  -2),
12562 
12563        /* 391-400 */
12564           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0, 1, 0, 0, 0, 0,    8,  11,    0,   0),
12565           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0, 1, 0, 0, 0, 1,    0,   3,    2,   0),
12566           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0, 1, 0, 0, 0, 2, -262,   0,    0, 114),
12567           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -6,  0, 0, 0, 0, 0, 0,    0,  -4,    0,   0),
12568           new PlanetaryNutModel( 0, 0, 0, 0, 0, -3,  6,  0, 0, 0, 0, 0, 1,   -7,   0,    0,   4),
12569           new PlanetaryNutModel( 0, 0, 0, 0, 0, -3,  6,  0, 0, 0, 0, 0, 2,    0, -27,  -12,   0),
12570           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -1,  4, 0, 0, 0, 0, 2,  -19,  -8,   -4,   8),
12571           new PlanetaryNutModel( 0, 0, 0, 0, 0, -5,  7,  0, 0, 0, 0, 0, 2,  202,   0,    0, -87),
12572           new PlanetaryNutModel( 0, 0, 0, 0, 0, -5,  7,  0, 0, 0, 0, 0, 1,   -8,  35,   19,   5),
12573           new PlanetaryNutModel( 0, 1,-1, 1, 0, -5,  6,  0, 0, 0, 0, 0, 0,    0,   4,    2,   0),
12574 
12575        /* 401-410 */
12576           new PlanetaryNutModel( 0, 0, 0, 0, 0,  5, -7,  0, 0, 0, 0, 0, 0,   16,  -5,    0,   0),
12577           new PlanetaryNutModel( 0, 2,-2, 1, 0,  0, -1,  0, 1, 0, 0, 0, 0,    5,   0,    0,  -3),
12578           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -1,  0, 1, 0, 0, 0, 0,    0,  -3,    0,   0),
12579           new PlanetaryNutModel( 0, 0, 0, 0,-1,  0,  3,  0, 0, 0, 0, 0, 2,    1,   0,    0,   0),
12580           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0, 2, 0, 0, 0, 2,  -35, -48,  -21,  15),
12581           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -2,  6, 0, 0, 0, 0, 2,   -3,  -5,   -2,   1),
12582           new PlanetaryNutModel( 0, 0, 0, 1, 0,  2, -2,  0, 0, 0, 0, 0, 0,    6,   0,    0,  -3),
12583           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -6,  9, 0, 0, 0, 0, 2,    3,   0,    0,  -1),
12584           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6, -9, 0, 0, 0, 0, 0,    0,  -5,    0,   0),
12585           new PlanetaryNutModel( 0, 0, 0, 0, 0, -2,  2,  0, 0, 0, 0, 0, 1,   12,  55,   29,  -6),
12586 
12587        /* 411-420 */
12588           new PlanetaryNutModel( 0, 1,-1, 1, 0, -2,  1,  0, 0, 0, 0, 0, 0,    0,   5,    3,   0),
12589           new PlanetaryNutModel( 0, 0, 0, 0, 0,  2, -2,  0, 0, 0, 0, 0, 0, -598,   0,    0,   0),
12590           new PlanetaryNutModel( 0, 0, 0, 0, 0,  2, -2,  0, 0, 0, 0, 0, 1,   -3, -13,   -7,   1),
12591           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  0, 3, 0, 0, 0, 2,   -5,  -7,   -3,   2),
12592           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -5,  7, 0, 0, 0, 0, 2,    3,   0,    0,  -1),
12593           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  5, -7, 0, 0, 0, 0, 0,    5,  -7,    0,   0),
12594           new PlanetaryNutModel( 0, 0, 0, 1, 0, -2,  2,  0, 0, 0, 0, 0, 0,    4,   0,    0,  -2),
12595           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4, -5, 0, 0, 0, 0, 0,   16,  -6,    0,   0),
12596           new PlanetaryNutModel( 0, 0, 0, 0, 0,  1, -3,  0, 0, 0, 0, 0, 0,    8,  -3,    0,   0),
12597           new PlanetaryNutModel( 0, 0, 0, 0, 0, -1,  3,  0, 0, 0, 0, 0, 1,    8, -31,  -16,  -4),
12598 
12599        /* 421-430 */
12600           new PlanetaryNutModel( 0, 1,-1, 1, 0, -1,  2,  0, 0, 0, 0, 0, 0,    0,   3,    1,   0),
12601           new PlanetaryNutModel( 0, 0, 0, 0, 0, -1,  3,  0, 0, 0, 0, 0, 2,  113,   0,    0, -49),
12602           new PlanetaryNutModel( 0, 0, 0, 0, 0, -7, 10,  0, 0, 0, 0, 0, 2,    0, -24,  -10,   0),
12603           new PlanetaryNutModel( 0, 0, 0, 0, 0, -7, 10,  0, 0, 0, 0, 0, 1,    4,   0,    0,  -2),
12604           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3, -3, 0, 0, 0, 0, 0,   27,   0,    0,   0),
12605           new PlanetaryNutModel( 0, 0, 0, 0, 0, -4,  8,  0, 0, 0, 0, 0, 2,   -3,   0,    0,   1),
12606           new PlanetaryNutModel( 0, 0, 0, 0, 0, -4,  5,  0, 0, 0, 0, 0, 2,    0,  -4,   -2,   0),
12607           new PlanetaryNutModel( 0, 0, 0, 0, 0, -4,  5,  0, 0, 0, 0, 0, 1,    5,   0,    0,  -2),
12608           new PlanetaryNutModel( 0, 0, 0, 0, 0,  4, -5,  0, 0, 0, 0, 0, 0,    0,  -3,    0,   0),
12609           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  1, 0, 0, 0, 0, 2,  -13,   0,    0,   6),
12610 
12611        /* 431-440 */
12612           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -2,  0, 5, 0, 0, 0, 2,    5,   0,    0,  -2),
12613           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  3, 0, 0, 0, 0, 2,  -18, -10,   -4,   8),
12614           new PlanetaryNutModel( 0, 0, 0, 0, 0,  1,  0,  0, 0, 0, 0, 0, 0,   -4, -28,    0,   0),
12615           new PlanetaryNutModel( 0, 0, 0, 0, 0,  1,  0,  0, 0, 0, 0, 0, 2,   -5,   6,    3,   2),
12616           new PlanetaryNutModel( 0, 0, 0, 0, 0, -9, 13,  0, 0, 0, 0, 0, 2,   -3,   0,    0,   1),
12617           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -1,  5, 0, 0, 0, 0, 2,   -5,  -9,   -4,   2),
12618           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -2,  0, 4, 0, 0, 0, 2,   17,   0,    0,  -7),
12619           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0,-4, 0, 0, 0, 0,   11,   4,    0,   0),
12620           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -2,  7, 0, 0, 0, 0, 2,    0,  -6,   -2,   0),
12621           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0,-3, 0, 0, 0, 0,   83,  15,    0,   0),
12622 
12623        /* 441-450 */
12624           new PlanetaryNutModel( 0, 0, 0, 0, 0, -2,  5,  0, 0, 0, 0, 0, 1,   -4,   0,    0,   2),
12625           new PlanetaryNutModel( 0, 0, 0, 0, 0, -2,  5,  0, 0, 0, 0, 0, 2,    0,-114,  -49,   0),
12626           new PlanetaryNutModel( 0, 0, 0, 0, 0, -6,  8,  0, 0, 0, 0, 0, 2,  117,   0,    0, -51),
12627           new PlanetaryNutModel( 0, 0, 0, 0, 0, -6,  8,  0, 0, 0, 0, 0, 1,   -5,  19,   10,   2),
12628           new PlanetaryNutModel( 0, 0, 0, 0, 0,  6, -8,  0, 0, 0, 0, 0, 0,   -3,   0,    0,   0),
12629           new PlanetaryNutModel( 0, 0, 0, 1, 0,  0,  2,  0,-2, 0, 0, 0, 0,   -3,   0,    0,   2),
12630           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -3,  9, 0, 0, 0, 0, 2,    0,  -3,   -1,   0),
12631           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  5, -6, 0, 0, 0, 0, 0,    3,   0,    0,   0),
12632           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  5, -6, 0, 0, 0, 0, 2,    0,  -6,   -2,   0),
12633           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0,-2, 0, 0, 0, 0,  393,   3,    0,   0),
12634 
12635        /* 451-460 */
12636           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0,-2, 0, 0, 0, 1,   -4,  21,   11,   2),
12637           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0,-2, 0, 0, 0, 2,   -6,   0,   -1,   3),
12638           new PlanetaryNutModel( 0, 0, 0, 0, 0, -5, 10,  0, 0, 0, 0, 0, 2,   -3,   8,    4,   1),
12639           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4, -4, 0, 0, 0, 0, 0,    8,   0,    0,   0),
12640           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4, -4, 0, 0, 0, 0, 2,   18, -29,  -13,  -8),
12641           new PlanetaryNutModel( 0, 0, 0, 0, 0, -3,  3,  0, 0, 0, 0, 0, 1,    8,  34,   18,  -4),
12642           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -3,  0, 0, 0, 0, 0, 0,   89,   0,    0,   0),
12643           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -3,  0, 0, 0, 0, 0, 1,    3,  12,    6,  -1),
12644           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -3,  0, 0, 0, 0, 0, 2,   54, -15,   -7, -24),
12645           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0, 0,-3, 0, 0, 0,    0,   3,    0,   0),
12646 
12647        /* 461-470 */
12648           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -5, 13, 0, 0, 0, 0, 2,    3,   0,    0,  -1),
12649           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0,-1, 0, 0, 0, 0,    0,  35,    0,   0),
12650           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0,-1, 0, 0, 0, 2, -154, -30,  -13,  67),
12651           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0, 0,-2, 0, 0, 0,   15,   0,    0,   0),
12652           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0, 0,-2, 0, 0, 1,    0,   4,    2,   0),
12653           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3, -2, 0, 0, 0, 0, 0,    0,   9,    0,   0),
12654           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3, -2, 0, 0, 0, 0, 2,   80, -71,  -31, -35),
12655           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0, 0,-1, 0, 0, 2,    0, -20,   -9,   0),
12656           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -6, 15, 0, 0, 0, 0, 2,   11,   5,    2,  -5),
12657           new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 15,  0, 0, 0, 0, 0, 2,   61, -96,  -42, -27),
12658 
12659        /* 471-480 */
12660           new PlanetaryNutModel( 0, 0, 0, 0, 0, -3,  9, -4, 0, 0, 0, 0, 2,   14,   9,    4,  -6),
12661           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0, 2,-5, 0, 0, 2,  -11,  -6,   -3,   5),
12662           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -2,  8,-1,-5, 0, 0, 2,    0,  -3,   -1,   0),
12663           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6, -8, 3, 0, 0, 0, 2,  123,-415, -180, -53),
12664           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0, 0, 0, 0, 0, 0,    0,   0,    0, -35),
12665           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0, 0, 0, 0, 0, 0,   -5,   0,    0,   0),
12666           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0, 0, 0, 0, 0, 1,    7, -32,  -17,  -4),
12667           new PlanetaryNutModel( 0, 1,-1, 1, 0,  0,  1,  0, 0, 0, 0, 0, 0,    0,  -9,   -5,   0),
12668           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0, 0, 0, 0, 0, 1,    0,  -4,    2,   0),
12669           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0, 0, 0, 0, 0, 2,  -89,   0,    0,  38),
12670 
12671        /* 481-490 */
12672           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -6, 16,-4,-5, 0, 0, 2,    0, -86,  -19,  -6),
12673           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -2,  8,-3, 0, 0, 0, 2,    0,   0,  -19,   6),
12674           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -2,  8,-3, 0, 0, 0, 2, -123,-416, -180,  53),
12675           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6, -8, 1, 5, 0, 0, 2,    0,  -3,   -1,   0),
12676           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0,-2, 5, 0, 0, 2,   12,  -6,   -3,  -5),
12677           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -5,  4, 0, 0, 0, 0, 2,  -13,   9,    4,   6),
12678           new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 11,  0, 0, 0, 0, 0, 2,    0, -15,   -7,   0),
12679           new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 11,  0, 0, 0, 0, 0, 1,    3,   0,    0,  -1),
12680           new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 11,  0, 0, 0, 0, 0, 2,  -62, -97,  -42,  27),
12681           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, 11,  0, 0, 0, 0, 0, 2,  -11,   5,    2,   5),
12682 
12683        /* 491-500 */
12684           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0, 0, 1, 0, 0, 2,    0, -19,   -8,   0),
12685           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -3,  0, 2, 0, 0, 0, 2,   -3,   0,    0,   1),
12686           new PlanetaryNutModel( 0, 2,-2, 1, 0,  0,  4, -8, 3, 0, 0, 0, 0,    0,   4,    2,   0),
12687           new PlanetaryNutModel( 0, 1,-1, 0, 0,  0,  1,  0, 0, 0, 0, 0, 0,    0,   3,    0,   0),
12688           new PlanetaryNutModel( 0, 2,-2, 1, 0,  0, -4,  8,-3, 0, 0, 0, 0,    0,   4,    2,   0),
12689           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  1,  2, 0, 0, 0, 0, 2,  -85, -70,  -31,  37),
12690           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0, 1, 0, 0, 0, 2,  163, -12,   -5, -72),
12691           new PlanetaryNutModel( 0, 0, 0, 0, 0, -3,  7,  0, 0, 0, 0, 0, 2,  -63, -16,   -7,  28),
12692           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  4, 0, 0, 0, 0, 2,  -21, -32,  -14,   9),
12693           new PlanetaryNutModel( 0, 0, 0, 0, 0, -5,  6,  0, 0, 0, 0, 0, 2,    0,  -3,   -1,   0),
12694 
12695        /* 501-510 */
12696           new PlanetaryNutModel( 0, 0, 0, 0, 0, -5,  6,  0, 0, 0, 0, 0, 1,    3,   0,    0,  -2),
12697           new PlanetaryNutModel( 0, 0, 0, 0, 0,  5, -6,  0, 0, 0, 0, 0, 0,    0,   8,    0,   0),
12698           new PlanetaryNutModel( 0, 0, 0, 0, 0,  5, -6,  0, 0, 0, 0, 0, 2,    3,  10,    4,  -1),
12699           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0, 2, 0, 0, 0, 2,    3,   0,    0,  -1),
12700           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -1,  6, 0, 0, 0, 0, 2,    0,  -7,   -3,   0),
12701           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  7, -9, 0, 0, 0, 0, 2,    0,  -4,   -2,   0),
12702           new PlanetaryNutModel( 0, 0, 0, 0, 0,  2, -1,  0, 0, 0, 0, 0, 0,    6,  19,    0,   0),
12703           new PlanetaryNutModel( 0, 0, 0, 0, 0,  2, -1,  0, 0, 0, 0, 0, 2,    5,-173,  -75,  -2),
12704           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6, -7, 0, 0, 0, 0, 2,    0,  -7,   -3,   0),
12705           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  5, -5, 0, 0, 0, 0, 2,    7, -12,   -5,  -3),
12706 
12707        /* 511-520 */
12708           new PlanetaryNutModel( 0, 0, 0, 0, 0, -1,  4,  0, 0, 0, 0, 0, 1,   -3,   0,    0,   2),
12709           new PlanetaryNutModel( 0, 0, 0, 0, 0, -1,  4,  0, 0, 0, 0, 0, 2,    3,  -4,   -2,  -1),
12710           new PlanetaryNutModel( 0, 0, 0, 0, 0, -7,  9,  0, 0, 0, 0, 0, 2,   74,   0,    0, -32),
12711           new PlanetaryNutModel( 0, 0, 0, 0, 0, -7,  9,  0, 0, 0, 0, 0, 1,   -3,  12,    6,   2),
12712           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4, -3, 0, 0, 0, 0, 2,   26, -14,   -6, -11),
12713           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3, -1, 0, 0, 0, 0, 2,   19,   0,    0,  -8),
12714           new PlanetaryNutModel( 0, 0, 0, 0, 0, -4,  4,  0, 0, 0, 0, 0, 1,    6,  24,   13,  -3),
12715           new PlanetaryNutModel( 0, 0, 0, 0, 0,  4, -4,  0, 0, 0, 0, 0, 0,   83,   0,    0,   0),
12716           new PlanetaryNutModel( 0, 0, 0, 0, 0,  4, -4,  0, 0, 0, 0, 0, 1,    0, -10,   -5,   0),
12717           new PlanetaryNutModel( 0, 0, 0, 0, 0,  4, -4,  0, 0, 0, 0, 0, 2,   11,  -3,   -1,  -5),
12718 
12719        /* 521-530 */
12720           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  1, 0, 0, 0, 0, 2,    3,   0,    1,  -1),
12721           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -3,  0, 5, 0, 0, 0, 2,    3,   0,    0,  -1),
12722           new PlanetaryNutModel( 0, 0, 0, 0, 0,  1,  1,  0, 0, 0, 0, 0, 0,   -4,   0,    0,   0),
12723           new PlanetaryNutModel( 0, 0, 0, 0, 0,  1,  1,  0, 0, 0, 0, 0, 1,    5, -23,  -12,  -3),
12724           new PlanetaryNutModel( 0, 0, 0, 0, 0,  1,  1,  0, 0, 0, 0, 0, 2, -339,   0,    0, 147),
12725           new PlanetaryNutModel( 0, 0, 0, 0, 0, -9, 12,  0, 0, 0, 0, 0, 2,    0, -10,   -5,   0),
12726           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3,  0,-4, 0, 0, 0, 0,    5,   0,    0,   0),
12727           new PlanetaryNutModel( 0, 2,-2, 1, 0,  1, -1,  0, 0, 0, 0, 0, 0,    3,   0,    0,  -1),
12728           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  7, -8, 0, 0, 0, 0, 2,    0,  -4,   -2,   0),
12729           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3,  0,-3, 0, 0, 0, 0,   18,  -3,    0,   0),
12730 
12731        /* 531-540 */
12732           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3,  0,-3, 0, 0, 0, 2,    9, -11,   -5,  -4),
12733           new PlanetaryNutModel( 0, 0, 0, 0, 0, -2,  6,  0, 0, 0, 0, 0, 2,   -8,   0,    0,   4),
12734           new PlanetaryNutModel( 0, 0, 0, 0, 0, -6,  7,  0, 0, 0, 0, 0, 1,    3,   0,    0,  -1),
12735           new PlanetaryNutModel( 0, 0, 0, 0, 0,  6, -7,  0, 0, 0, 0, 0, 0,    0,   9,    0,   0),
12736           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6, -6, 0, 0, 0, 0, 2,    6,  -9,   -4,  -2),
12737           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3,  0,-2, 0, 0, 0, 0,   -4, -12,    0,   0),
12738           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3,  0,-2, 0, 0, 0, 2,   67, -91,  -39, -29),
12739           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  5, -4, 0, 0, 0, 0, 2,   30, -18,   -8, -13),
12740           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -2,  0, 0, 0, 0, 0, 0,    0,   0,    0,   0),
12741           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -2,  0, 0, 0, 0, 0, 2,    0,-114,  -50,   0),
12742 
12743        /* 541-550 */
12744           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3,  0,-1, 0, 0, 0, 2,    0,   0,    0,  23),
12745           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3,  0,-1, 0, 0, 0, 2,  517,  16,    7,-224),
12746           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3,  0, 0,-2, 0, 0, 2,    0,  -7,   -3,   0),
12747           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4, -2, 0, 0, 0, 0, 2,  143,  -3,   -1, -62),
12748           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3,  0, 0,-1, 0, 0, 2,   29,   0,    0, -13),
12749           new PlanetaryNutModel( 0, 2,-2, 1, 0,  0,  1,  0,-1, 0, 0, 0, 0,   -4,   0,    0,   2),
12750           new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 16,  0, 0, 0, 0, 0, 2,   -6,   0,    0,   3),
12751           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3,  0, 2,-5, 0, 0, 2,    5,  12,    5,  -2),
12752           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  7, -8, 3, 0, 0, 0, 2,  -25,   0,    0,  11),
12753           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -5, 16,-4,-5, 0, 0, 2,   -3,   0,    0,   1),
12754 
12755        /* 551-560 */
12756           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3,  0, 0, 0, 0, 0, 2,    0,   4,    2,   0),
12757           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0, -1,  8,-3, 0, 0, 0, 2,  -22,  12,    5,  10),
12758           new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 10,  0, 0, 0, 0, 0, 2,   50,   0,    0, -22),
12759           new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 10,  0, 0, 0, 0, 0, 1,    0,   7,    4,   0),
12760           new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 10,  0, 0, 0, 0, 0, 2,    0,   3,    1,   0),
12761           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  2, 0, 0, 0, 0, 2,   -4,   4,    2,   2),
12762           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  3,  0, 1, 0, 0, 0, 2,   -5, -11,   -5,   2),
12763           new PlanetaryNutModel( 0, 0, 0, 0, 0, -3,  8,  0, 0, 0, 0, 0, 2,    0,   4,    2,   0),
12764           new PlanetaryNutModel( 0, 0, 0, 0, 0, -5,  5,  0, 0, 0, 0, 0, 1,    4,  17,    9,  -2),
12765           new PlanetaryNutModel( 0, 0, 0, 0, 0,  5, -5,  0, 0, 0, 0, 0, 0,   59,   0,    0,   0),
12766 
12767        /* 561-570 */
12768           new PlanetaryNutModel( 0, 0, 0, 0, 0,  5, -5,  0, 0, 0, 0, 0, 1,    0,  -4,   -2,   0),
12769           new PlanetaryNutModel( 0, 0, 0, 0, 0,  5, -5,  0, 0, 0, 0, 0, 2,   -8,   0,    0,   4),
12770           new PlanetaryNutModel( 0, 0, 0, 0, 0,  2,  0,  0, 0, 0, 0, 0, 0,   -3,   0,    0,   0),
12771           new PlanetaryNutModel( 0, 0, 0, 0, 0,  2,  0,  0, 0, 0, 0, 0, 1,    4, -15,   -8,  -2),
12772           new PlanetaryNutModel( 0, 0, 0, 0, 0,  2,  0,  0, 0, 0, 0, 0, 2,  370,  -8,    0,-160),
12773           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  7, -7, 0, 0, 0, 0, 2,    0,   0,   -3,   0),
12774           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  7, -7, 0, 0, 0, 0, 2,    0,   3,    1,   0),
12775           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6, -5, 0, 0, 0, 0, 2,   -6,   3,    1,   3),
12776           new PlanetaryNutModel( 0, 0, 0, 0, 0,  7, -8,  0, 0, 0, 0, 0, 0,    0,   6,    0,   0),
12777           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  5, -3, 0, 0, 0, 0, 2,  -10,   0,    0,   4),
12778 
12779        /* 571-580 */
12780           new PlanetaryNutModel( 0, 0, 0, 0, 0,  4, -3,  0, 0, 0, 0, 0, 2,    0,   9,    4,   0),
12781           new PlanetaryNutModel( 0, 0, 0, 0, 0,  1,  2,  0, 0, 0, 0, 0, 2,    4,  17,    7,  -2),
12782           new PlanetaryNutModel( 0, 0, 0, 0, 0, -9, 11,  0, 0, 0, 0, 0, 2,   34,   0,    0, -15),
12783           new PlanetaryNutModel( 0, 0, 0, 0, 0, -9, 11,  0, 0, 0, 0, 0, 1,    0,   5,    3,   0),
12784           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4,  0,-4, 0, 0, 0, 2,   -5,   0,    0,   2),
12785           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4,  0,-3, 0, 0, 0, 2,  -37,  -7,   -3,  16),
12786           new PlanetaryNutModel( 0, 0, 0, 0, 0, -6,  6,  0, 0, 0, 0, 0, 1,    3,  13,    7,  -2),
12787           new PlanetaryNutModel( 0, 0, 0, 0, 0,  6, -6,  0, 0, 0, 0, 0, 0,   40,   0,    0,   0),
12788           new PlanetaryNutModel( 0, 0, 0, 0, 0,  6, -6,  0, 0, 0, 0, 0, 1,    0,  -3,   -2,   0),
12789           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4,  0,-2, 0, 0, 0, 2, -184,  -3,   -1,  80),
12790 
12791        /* 581-590 */
12792           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6, -4, 0, 0, 0, 0, 2,   -3,   0,    0,   1),
12793           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -1,  0, 0, 0, 0, 0, 0,   -3,   0,    0,   0),
12794           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -1,  0, 0, 0, 0, 0, 1,    0, -10,   -6,  -1),
12795           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3, -1,  0, 0, 0, 0, 0, 2,   31,  -6,    0, -13),
12796           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4,  0,-1, 0, 0, 0, 2,   -3, -32,  -14,   1),
12797           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4,  0, 0,-2, 0, 0, 2,   -7,   0,    0,   3),
12798           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  5, -2, 0, 0, 0, 0, 2,    0,  -8,   -4,   0),
12799           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  4,  0, 0, 0, 0, 0, 0,    3,  -4,    0,   0),
12800           new PlanetaryNutModel( 0, 0, 0, 0, 0,  8, -9,  0, 0, 0, 0, 0, 0,    0,   4,    0,   0),
12801           new PlanetaryNutModel( 0, 0, 0, 0, 0,  5, -4,  0, 0, 0, 0, 0, 2,    0,   3,    1,   0),
12802 
12803        /* 591-600 */
12804           new PlanetaryNutModel( 0, 0, 0, 0, 0,  2,  1,  0, 0, 0, 0, 0, 2,   19, -23,  -10,   2),
12805           new PlanetaryNutModel( 0, 0, 0, 0, 0,  2,  1,  0, 0, 0, 0, 0, 1,    0,   0,    0, -10),
12806           new PlanetaryNutModel( 0, 0, 0, 0, 0,  2,  1,  0, 0, 0, 0, 0, 1,    0,   3,    2,   0),
12807           new PlanetaryNutModel( 0, 0, 0, 0, 0, -7,  7,  0, 0, 0, 0, 0, 1,    0,   9,    5,  -1),
12808           new PlanetaryNutModel( 0, 0, 0, 0, 0,  7, -7,  0, 0, 0, 0, 0, 0,   28,   0,    0,   0),
12809           new PlanetaryNutModel( 0, 0, 0, 0, 0,  4, -2,  0, 0, 0, 0, 0, 1,    0,  -7,   -4,   0),
12810           new PlanetaryNutModel( 0, 0, 0, 0, 0,  4, -2,  0, 0, 0, 0, 0, 2,    8,  -4,    0,  -4),
12811           new PlanetaryNutModel( 0, 0, 0, 0, 0,  4, -2,  0, 0, 0, 0, 0, 0,    0,   0,   -2,   0),
12812           new PlanetaryNutModel( 0, 0, 0, 0, 0,  4, -2,  0, 0, 0, 0, 0, 0,    0,   3,    0,   0),
12813           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  5,  0,-4, 0, 0, 0, 2,   -3,   0,    0,   1),
12814 
12815        /* 601-610 */
12816           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  5,  0,-3, 0, 0, 0, 2,   -9,   0,    1,   4),
12817           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  5,  0,-2, 0, 0, 0, 2,    3,  12,    5,  -1),
12818           new PlanetaryNutModel( 0, 0, 0, 0, 0,  3,  0,  0, 0, 0, 0, 0, 2,   17,  -3,   -1,   0),
12819           new PlanetaryNutModel( 0, 0, 0, 0, 0, -8,  8,  0, 0, 0, 0, 0, 1,    0,   7,    4,   0),
12820           new PlanetaryNutModel( 0, 0, 0, 0, 0,  8, -8,  0, 0, 0, 0, 0, 0,   19,   0,    0,   0),
12821           new PlanetaryNutModel( 0, 0, 0, 0, 0,  5, -3,  0, 0, 0, 0, 0, 1,    0,  -5,   -3,   0),
12822           new PlanetaryNutModel( 0, 0, 0, 0, 0,  5, -3,  0, 0, 0, 0, 0, 2,   14,  -3,    0,  -1),
12823           new PlanetaryNutModel( 0, 0, 0, 0, 0, -9,  9,  0, 0, 0, 0, 0, 1,    0,   0,   -1,   0),
12824           new PlanetaryNutModel( 0, 0, 0, 0, 0, -9,  9,  0, 0, 0, 0, 0, 1,    0,   0,    0,  -5),
12825           new PlanetaryNutModel( 0, 0, 0, 0, 0, -9,  9,  0, 0, 0, 0, 0, 1,    0,   5,    3,   0),
12826 
12827        /* 611-620 */
12828           new PlanetaryNutModel( 0, 0, 0, 0, 0,  9, -9,  0, 0, 0, 0, 0, 0,   13,   0,    0,   0),
12829           new PlanetaryNutModel( 0, 0, 0, 0, 0,  6, -4,  0, 0, 0, 0, 0, 1,    0,  -3,   -2,   0),
12830           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6,  0, 0, 0, 0, 0, 2,    2,   9,    4,   3),
12831           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6,  0, 0, 0, 0, 0, 0,    0,   0,    0,  -4),
12832           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6,  0, 0, 0, 0, 0, 0,    8,   0,    0,   0),
12833           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6,  0, 0, 0, 0, 0, 1,    0,   4,    2,   0),
12834           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6,  0, 0, 0, 0, 0, 2,    6,   0,    0,  -3),
12835           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6,  0, 0, 0, 0, 0, 0,    6,   0,    0,   0),
12836           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6,  0, 0, 0, 0, 0, 1,    0,   3,    1,   0),
12837           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  6,  0, 0, 0, 0, 0, 2,    5,   0,    0,  -2),
12838 
12839        /* 621-630 */
12840           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  0,  0, 0, 0, 0, 0, 2,    3,   0,    0,  -1),
12841           new PlanetaryNutModel( 1, 0,-2, 0, 0,  0,  2,  0,-2, 0, 0, 0, 0,   -3,   0,    0,   0),
12842           new PlanetaryNutModel( 1, 0,-2, 0, 0,  2, -2,  0, 0, 0, 0, 0, 0,    6,   0,    0,   0),
12843           new PlanetaryNutModel( 1, 0,-2, 0, 0,  0,  1,  0,-1, 0, 0, 0, 0,    7,   0,    0,   0),
12844           new PlanetaryNutModel( 1, 0,-2, 0, 0,  1, -1,  0, 0, 0, 0, 0, 0,   -4,   0,    0,   0),
12845           new PlanetaryNutModel(-1, 0, 0, 0, 0,  3, -3,  0, 0, 0, 0, 0, 0,    4,   0,    0,   0),
12846           new PlanetaryNutModel(-1, 0, 0, 0, 0,  0,  2,  0,-2, 0, 0, 0, 0,    6,   0,    0,   0),
12847           new PlanetaryNutModel(-1, 0, 2, 0, 0,  0,  4, -8, 3, 0, 0, 0, 0,    0,  -4,    0,   0),
12848           new PlanetaryNutModel( 1, 0,-2, 0, 0,  0,  4, -8, 3, 0, 0, 0, 0,    0,  -4,    0,   0),
12849           new PlanetaryNutModel(-2, 0, 2, 0, 0,  0,  4, -8, 3, 0, 0, 0, 0,    5,   0,    0,   0),
12850 
12851        /* 631-640 */
12852           new PlanetaryNutModel(-1, 0, 0, 0, 0,  0,  2,  0,-3, 0, 0, 0, 0,   -3,   0,    0,   0),
12853           new PlanetaryNutModel(-1, 0, 0, 0, 0,  0,  1,  0,-1, 0, 0, 0, 0,    4,   0,    0,   0),
12854           new PlanetaryNutModel(-1, 0, 0, 0, 0,  1, -1,  0, 0, 0, 0, 0, 0,   -5,   0,    0,   0),
12855           new PlanetaryNutModel(-1, 0, 2, 0, 0,  2, -2,  0, 0, 0, 0, 0, 0,    4,   0,    0,   0),
12856           new PlanetaryNutModel( 1,-1, 1, 0, 0,  0,  1,  0, 0, 0, 0, 0, 0,    0,   3,    0,   0),
12857           new PlanetaryNutModel(-1, 0, 2, 0, 0,  0,  2,  0,-3, 0, 0, 0, 0,   13,   0,    0,   0),
12858           new PlanetaryNutModel(-2, 0, 0, 0, 0,  0,  2,  0,-3, 0, 0, 0, 0,   21,  11,    0,   0),
12859           new PlanetaryNutModel( 1, 0, 0, 0, 0,  0,  4, -8, 3, 0, 0, 0, 0,    0,  -5,    0,   0),
12860           new PlanetaryNutModel(-1, 1,-1, 1, 0,  0, -1,  0, 0, 0, 0, 0, 0,    0,  -5,   -2,   0),
12861           new PlanetaryNutModel( 1, 1,-1, 1, 0,  0, -1,  0, 0, 0, 0, 0, 0,    0,   5,    3,   0),
12862 
12863        /* 641-650 */
12864           new PlanetaryNutModel(-1, 0, 0, 0, 0,  0,  4, -8, 3, 0, 0, 0, 0,    0,  -5,    0,   0),
12865           new PlanetaryNutModel(-1, 0, 2, 1, 0,  0,  2,  0,-2, 0, 0, 0, 0,   -3,   0,    0,   2),
12866           new PlanetaryNutModel( 0, 0, 0, 0, 0,  0,  2,  0,-2, 0, 0, 0, 0,   20,  10,    0,   0),
12867           new PlanetaryNutModel(-1, 0, 2, 0, 0,  0,  2,  0,-2, 0, 0, 0, 0,  -34,   0,    0,   0),
12868           new PlanetaryNutModel(-1, 0, 2, 0, 0,  3, -3,  0, 0, 0, 0, 0, 0,  -19,   0,    0,   0),
12869           new PlanetaryNutModel( 1, 0,-2, 1, 0,  0, -2,  0, 2, 0, 0, 0, 0,    3,   0,    0,  -2),
12870           new PlanetaryNutModel( 1, 2,-2, 2, 0, -3,  3,  0, 0, 0, 0, 0, 0,   -3,   0,    0,   1),
12871           new PlanetaryNutModel( 1, 2,-2, 2, 0,  0, -2,  0, 2, 0, 0, 0, 0,   -6,   0,    0,   3),
12872           new PlanetaryNutModel( 1, 0, 0, 0, 0,  1, -1,  0, 0, 0, 0, 0, 0,   -4,   0,    0,   0),
12873           new PlanetaryNutModel( 1, 0, 0, 0, 0,  0,  1,  0,-1, 0, 0, 0, 0,    3,   0,    0,   0),
12874 
12875        /* 651-660 */
12876           new PlanetaryNutModel( 0, 0,-2, 0, 0,  2, -2,  0, 0, 0, 0, 0, 0,    3,   0,    0,   0),
12877           new PlanetaryNutModel( 0, 0,-2, 0, 0,  0,  1,  0,-1, 0, 0, 0, 0,    4,   0,    0,   0),
12878           new PlanetaryNutModel( 0, 2, 0, 2, 0, -2,  2,  0, 0, 0, 0, 0, 0,    3,   0,    0,  -1),
12879           new PlanetaryNutModel( 0, 2, 0, 2, 0,  0, -1,  0, 1, 0, 0, 0, 0,    6,   0,    0,  -3),
12880           new PlanetaryNutModel( 0, 2, 0, 2, 0, -1,  1,  0, 0, 0, 0, 0, 0,   -8,   0,    0,   3),
12881           new PlanetaryNutModel( 0, 2, 0, 2, 0, -2,  3,  0, 0, 0, 0, 0, 0,    0,   3,    1,   0),
12882           new PlanetaryNutModel( 0, 0, 2, 0, 0,  0,  2,  0,-2, 0, 0, 0, 0,   -3,   0,    0,   0),
12883           new PlanetaryNutModel( 0, 1, 1, 2, 0,  0,  1,  0, 0, 0, 0, 0, 0,    0,  -3,   -2,   0),
12884           new PlanetaryNutModel( 1, 2, 0, 2, 0,  0,  1,  0, 0, 0, 0, 0, 0,  126, -63,  -27, -55),
12885           new PlanetaryNutModel(-1, 2, 0, 2, 0, 10, -3,  0, 0, 0, 0, 0, 0,   -5,   0,    1,   2),
12886 
12887        /* 661-670 */
12888           new PlanetaryNutModel( 0, 1, 1, 1, 0,  0,  1,  0, 0, 0, 0, 0, 0,   -3,  28,   15,   2),
12889           new PlanetaryNutModel( 1, 2, 0, 2, 0,  0,  1,  0, 0, 0, 0, 0, 0,    5,   0,    1,  -2),
12890           new PlanetaryNutModel( 0, 2, 0, 2, 0,  0,  4, -8, 3, 0, 0, 0, 0,    0,   9,    4,   1),
12891           new PlanetaryNutModel( 0, 2, 0, 2, 0,  0, -4,  8,-3, 0, 0, 0, 0,    0,   9,    4,  -1),
12892           new PlanetaryNutModel(-1, 2, 0, 2, 0,  0, -4,  8,-3, 0, 0, 0, 0, -126, -63,  -27,  55),
12893           new PlanetaryNutModel( 2, 2,-2, 2, 0,  0, -2,  0, 3, 0, 0, 0, 0,    3,   0,    0,  -1),
12894           new PlanetaryNutModel( 1, 2, 0, 1, 0,  0, -2,  0, 3, 0, 0, 0, 0,   21, -11,   -6, -11),
12895           new PlanetaryNutModel( 0, 1, 1, 0, 0,  0,  1,  0, 0, 0, 0, 0, 0,    0,  -4,    0,   0),
12896           new PlanetaryNutModel(-1, 2, 0, 1, 0,  0,  1,  0, 0, 0, 0, 0, 0,  -21, -11,   -6,  11),
12897           new PlanetaryNutModel(-2, 2, 2, 2, 0,  0,  2,  0,-2, 0, 0, 0, 0,   -3,   0,    0,   1),
12898 
12899        /* 671-680 */
12900           new PlanetaryNutModel( 0, 2, 0, 2, 0,  2, -3,  0, 0, 0, 0, 0, 0,    0,   3,    1,   0),
12901           new PlanetaryNutModel( 0, 2, 0, 2, 0,  1, -1,  0, 0, 0, 0, 0, 0,    8,   0,    0,  -4),
12902           new PlanetaryNutModel( 0, 2, 0, 2, 0,  0,  1,  0,-1, 0, 0, 0, 0,   -6,   0,    0,   3),
12903           new PlanetaryNutModel( 0, 2, 0, 2, 0,  2, -2,  0, 0, 0, 0, 0, 0,   -3,   0,    0,   1),
12904           new PlanetaryNutModel(-1, 2, 2, 2, 0,  0, -1,  0, 1, 0, 0, 0, 0,    3,   0,    0,  -1),
12905           new PlanetaryNutModel( 1, 2, 0, 2, 0, -1,  1,  0, 0, 0, 0, 0, 0,   -3,   0,    0,   1),
12906           new PlanetaryNutModel(-1, 2, 2, 2, 0,  0,  2,  0,-3, 0, 0, 0, 0,   -5,   0,    0,   2),
12907           new PlanetaryNutModel( 2, 2, 0, 2, 0,  0,  2,  0,-3, 0, 0, 0, 0,   24, -12,   -5, -11),
12908           new PlanetaryNutModel( 1, 2, 0, 2, 0,  0, -4,  8,-3, 0, 0, 0, 0,    0,   3,    1,   0),
12909           new PlanetaryNutModel( 1, 2, 0, 2, 0,  0,  4, -8, 3, 0, 0, 0, 0,    0,   3,    1,   0),
12910 
12911        /* 681-687 */
12912           new PlanetaryNutModel( 1, 1, 1, 1, 0,  0,  1,  0, 0, 0, 0, 0, 0,    0,   3,    2,   0),
12913           new PlanetaryNutModel( 0, 2, 0, 2, 0,  0,  1,  0, 0, 0, 0, 0, 0,  -24, -12,   -5,  10),
12914           new PlanetaryNutModel( 2, 2, 0, 1, 0,  0,  1,  0, 0, 0, 0, 0, 0,    4,   0,   -1,  -2),
12915           new PlanetaryNutModel(-1, 2, 2, 2, 0,  0,  2,  0,-2, 0, 0, 0, 0,   13,   0,    0,  -6),
12916           new PlanetaryNutModel(-1, 2, 2, 2, 0,  3, -3,  0, 0, 0, 0, 0, 0,    7,   0,    0,  -3),
12917           new PlanetaryNutModel( 1, 2, 0, 2, 0,  1, -1,  0, 0, 0, 0, 0, 0,    3,   0,    0,  -1),
12918           new PlanetaryNutModel( 0, 2, 2, 2, 0,  0,  2,  0,-2, 0, 0, 0, 0,    3,   0,    0,  -1)
12919        };
12920 
12921     /* Number of terms in the planetary nutation model */
12922        final int NPL = xpl.length;
12923 
12924     /*--------------------------------------------------------------------*/
12925 
12926     /* Interval between fundamental date J2000.0 and given date (JC). */
12927        t = ((date1 - DJ00) + date2) / DJC;
12928 
12929     /* ------------------- */
12930     /* LUNI-SOLAR NUTATION */
12931     /* ------------------- */
12932 
12933     /* Fundamental (Delaunay) arguments */
12934 
12935     /* Mean anomaly of the Moon (IERS 2003). */
12936        el = jauFal03(t);
12937 
12938     /* Mean anomaly of the Sun (MHB2000). */
12939        elp = fmod(1287104.79305  +
12940                 t * (129596581.0481  +
12941                 t * (-0.5532  +
12942                 t * (0.000136  +
12943                 t * (-0.00001149)))), TURNAS) * DAS2R;
12944 
12945     /* Mean longitude of the Moon minus that of the ascending node */
12946     /* (IERS 2003. */
12947        f = jauFaf03(t);
12948 
12949     /* Mean elongation of the Moon from the Sun (MHB2000). */
12950        d = fmod(1072260.70369  +
12951               t * (1602961601.2090  +
12952               t * (-6.3706  +
12953               t * (0.006593  +
12954               t * (-0.00003169)))), TURNAS) * DAS2R;
12955 
12956     /* Mean longitude of the ascending node of the Moon (IERS 2003). */
12957        om = jauFaom03(t);
12958 
12959     /* Initialize the nutation values. */
12960        dp = 0.0;
12961        de = 0.0;
12962 
12963     /* Summation of luni-solar nutation series (in reverse order). */
12964        for (i = NLS-1; i >= 0; i--) {
12965 
12966        /* Argument and functions. */
12967           arg = fmod((double)xls[i].nl  * el +
12968                      (double)xls[i].nlp * elp +
12969                      (double)xls[i].nf  * f +
12970                      (double)xls[i].nd  * d +
12971                      (double)xls[i].nom * om, D2PI);
12972           sarg = sin(arg);
12973           carg = cos(arg);
12974 
12975        /* Term. */
12976           dp += (xls[i].sp + xls[i].spt * t) * sarg + xls[i].cp * carg;
12977           de += (xls[i].ce + xls[i].cet * t) * carg + xls[i].se * sarg;
12978        }
12979 
12980     /* Convert from 0.1 microarcsec units to radians. */
12981        dpsils = dp * U2R;
12982        depsls = de * U2R;
12983 
12984     /* ------------------ */
12985     /* PLANETARY NUTATION */
12986     /* ------------------ */
12987 
12988     /* n.b.  The MHB2000 code computes the luni-solar and planetary nutation */
12989     /* in different functions, using slightly different Delaunay */
12990     /* arguments in the two cases.  This behaviour is faithfully */
12991     /* reproduced here.  Use of the IERS 2003 expressions for both */
12992     /* cases leads to negligible changes, well below */
12993     /* 0.1 microarcsecond. */
12994 
12995     /* Mean anomaly of the Moon (MHB2000). */
12996        al = fmod(2.35555598 + 8328.6914269554 * t, D2PI);
12997 
12998     /* Mean longitude of the Moon minus that of the ascending node */
12999     /*(MHB2000). */
13000        af = fmod(1.627905234 + 8433.466158131 * t, D2PI);
13001 
13002     /* Mean elongation of the Moon from the Sun (MHB2000). */
13003        ad = fmod(5.198466741 + 7771.3771468121 * t, D2PI);
13004 
13005     /* Mean longitude of the ascending node of the Moon (MHB2000). */
13006        aom = fmod(2.18243920 - 33.757045 * t, D2PI);
13007 
13008     /* General accumulated precession in longitude (IERS 2003). */
13009        apa = jauFapa03(t);
13010 
13011     /* Planetary longitudes, Mercury through Uranus (IERS 2003). */
13012        alme = jauFame03(t);
13013        alve = jauFave03(t);
13014        alea = jauFae03(t);
13015        alma = jauFama03(t);
13016        alju = jauFaju03(t);
13017        alsa = jauFasa03(t);
13018        alur = jauFaur03(t);
13019 
13020     /* Neptune longitude (MHB2000). */
13021        alne = fmod(5.321159000 + 3.8127774000 * t, D2PI);
13022 
13023     /* Initialize the nutation values. */
13024        dp = 0.0;
13025        de = 0.0;
13026 
13027     /* Summation of planetary nutation series (in reverse order). */
13028        for (i = NPL-1; i >= 0; i--) {
13029 
13030        /* Argument and functions. */
13031           arg = fmod((double)xpl[i].nl  * al   +
13032                      (double)xpl[i].nf  * af   +
13033                      (double)xpl[i].nd  * ad   +
13034                      (double)xpl[i].nom * aom  +
13035                      (double)xpl[i].nme * alme +
13036                      (double)xpl[i].nve * alve +
13037                      (double)xpl[i].nea * alea +
13038                      (double)xpl[i].nma * alma +
13039                      (double)xpl[i].nju * alju +
13040                      (double)xpl[i].nsa * alsa +
13041                      (double)xpl[i].nur * alur +
13042                      (double)xpl[i].nne * alne +
13043                      (double)xpl[i].npa * apa, D2PI);
13044           sarg = sin(arg);
13045           carg = cos(arg);
13046 
13047        /* Term. */
13048           dp += (double)xpl[i].sp * sarg + (double)xpl[i].cp * carg;
13049           de += (double)xpl[i].se * sarg + (double)xpl[i].ce * carg;
13050 
13051        }
13052 
13053     /* Convert from 0.1 microarcsec units to radians. */
13054        dpsipl = dp * U2R;
13055        depspl = de * U2R;
13056 
13057     /* ------- */
13058     /* RESULTS */
13059     /* ------- */
13060 
13061     /* Add luni-solar and planetary components. */
13062        return new NutationTerms( dpsils + dpsipl,
13063                                depsls + depspl);
13064        }
13065     
13066 
13067     /**
13068     *  Nutation, IAU 2000B model.
13069     *
13070     *<p>This function is derived from the International Astronomical Union's
13071     *  SOFA (Standards Of Fundamental Astronomy) software collection.
13072     *
13073     *<p>Status:  canonical model.
13074     *
13075     *<!-- Given: -->
13076     *     @param date1 double TT as a 2-part Julian Date (Note 1)
13077     *     @param date2 double TT as a 2-part Julian Date (Note 1)
13078     *
13079     *<!-- Returned: -->
13080     *     @return  nutation, luni-solar + planetary (Note 2)
13081     *
13082     * <p>Notes:
13083     * <ol>
13084     *
13085     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
13086     *     convenient way between the two arguments.  For example,
13087     *     JD(TT)=2450123.7 could be expressed in any of these ways,
13088     *     among others:
13089     *<pre>
13090     *            date1          date2
13091     *
13092     *         2450123.7           0.0       (JD method)
13093     *         2451545.0       -1421.3       (J2000 method)
13094     *         2400000.5       50123.2       (MJD method)
13095     *         2450123.5           0.2       (date &amp; time method)
13096     *</pre>
13097     *     The JD method is the most natural and convenient to use in
13098     *     cases where the loss of several decimal digits of resolution
13099     *     is acceptable.  The J2000 method is best matched to the way
13100     *     the argument is handled internally and will deliver the
13101     *     optimum resolution.  The MJD method and the date &amp; time methods
13102     *     are both good compromises between resolution and convenience.
13103     *
13104     * <li> The nutation components in longitude and obliquity are in radians
13105     *     and with respect to the equinox and ecliptic of date.  The
13106     *     obliquity at J2000.0 is assumed to be the Lieske et al. (1977)
13107     *     value of 84381.448 arcsec.  (The errors that result from using
13108     *     this function with the IAU 2006 value of 84381.406 arcsec can be
13109     *     neglected.)
13110     *
13111     *     The nutation model consists only of luni-solar terms, but
13112     *     includes also a fixed offset which compensates for certain long-
13113     *     period planetary terms (Note 7).
13114     *
13115     * <li> This function is an implementation of the IAU 2000B abridged
13116     *     nutation model formally adopted by the IAU General Assembly in
13117     *     2000.  The function computes the MHB_2000_SHORT luni-solar
13118     *     nutation series (Luzum 2001), but without the associated
13119     *     corrections for the precession rate adjustments and the offset
13120     *     between the GCRS and J2000.0 mean poles.
13121     *
13122     * <li> The full IAU 2000A (MHB2000) nutation model contains nearly 1400
13123     *     terms.  The IAU 2000B model (McCarthy &amp; Luzum 2003) contains only
13124     *     77 terms, plus additional simplifications, yet still delivers
13125     *     results of 1 mas accuracy at present epochs.  This combination of
13126     *     accuracy and size makes the IAU 2000B abridged nutation model
13127     *     suitable for most practical applications.
13128     *
13129     *     The function delivers a pole accurate to 1 mas from 1900 to 2100
13130     *     (usually better than 1 mas, very occasionally just outside
13131     *     1 mas).  The full IAU 2000A model, which is implemented in the
13132     *     function jauNut00a (q.v.), delivers considerably greater accuracy
13133     *     at current dates;  however, to realize this improved accuracy,
13134     *     corrections for the essentially unpredictable free-core-nutation
13135     *     (FCN) must also be included.
13136     *
13137     * <li> The present function provides classical nutation.  The
13138     *     MHB_2000_SHORT algorithm, from which it is adapted, deals also
13139     *     with (i) the offsets between the GCRS and mean poles and (ii) the
13140     *     adjustments in longitude and obliquity due to the changed
13141     *     precession rates.  These additional functions, namely frame bias
13142     *     and precession adjustments, are supported by the JSOFA functions
13143     *     jauBi00  and jauPr00.
13144     *
13145     * <li> The MHB_2000_SHORT algorithm also provides "total" nutations,
13146     *     comprising the arithmetic sum of the frame bias, precession
13147     *     adjustments, and nutation (luni-solar + planetary).  These total
13148     *     nutations can be used in combination with an existing IAU 1976
13149     *     precession implementation, such as jauPmat76,  to deliver GCRS-
13150     *     to-true predictions of mas accuracy at current epochs.  However,
13151     *     for symmetry with the jauNut00a  function (q.v. for the reasons),
13152     *     the JSOFA functions do not generate the "total nutations"
13153     *     directly.  Should they be required, they could of course easily
13154     *     be generated by calling jauBi00, jauPr00 and the present function
13155     *     and adding the results.
13156     *
13157     * <li> The IAU 2000B model includes "planetary bias" terms that are
13158     *     fixed in size but compensate for long-period nutations.  The
13159     *     amplitudes quoted in McCarthy &amp; Luzum (2003), namely
13160     *     Dpsi = -1.5835 mas and Depsilon = +1.6339 mas, are optimized for
13161     *     the "total nutations" method described in Note 6.  The Luzum
13162     *     (2001) values used in this JSOFA implementation, namely -0.135 mas
13163     *     and +0.388 mas, are optimized for the "rigorous" method, where
13164     *     frame bias, precession and nutation are applied separately and in
13165     *     that order.  During the interval 1995-2050, the JSOFA
13166     *     implementation delivers a maximum error of 1.001 mas (not
13167     *     including FCN).
13168     *</ol>
13169     *<p>References:
13170     *
13171     *     <p>Lieske, J.H., Lederle, T., Fricke, W., Morando, B., "Expressions
13172     *     for the precession quantities based upon the IAU /1976/ system of
13173     *     astronomical constants", Astron.Astrophys. 58, 1-2, 1-16. (1977)
13174     *
13175     *     <p>Luzum, B., private communication, 2001 (Fortran code
13176     *     MHB_2000_SHORT)
13177     *
13178     *     <p>McCarthy, D.D. &amp; Luzum, B.J., "An abridged model of the
13179     *     precession-nutation of the celestial pole", Cel.Mech.Dyn.Astron.
13180     *     85, 37-49 (2003)
13181     *
13182     *     <p>Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
13183     *     Francou, G., Laskar, J., Astron.Astrophys. 282, 663-683 (1994)
13184     *
13185     *@version 2009 December 17
13186     *
13187     *  @since Release 20101201
13188     *
13189     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
13190     */
13191     public static NutationTerms jauNut00b(double date1, double date2)
13192     {
13193        double t, el, elp, f, d, om, arg, dp, de, sarg, carg,
13194               dpsils, depsls, dpsipl, depspl;
13195        int i;
13196 
13197     /* Units of 0.1 microarcsecond to radians */
13198        final double U2R = DAS2R / 1e7;
13199 
13200     /* ---------------------------------------- */
13201     /* Fixed offsets in lieu of planetary terms */
13202     /* ---------------------------------------- */
13203 
13204        final double DPPLAN = -0.135 * DMAS2R;
13205        final double DEPLAN =  0.388 * DMAS2R;
13206 
13207     /* --------------------------------------------------- */
13208     /* Luni-solar nutation: argument and term coefficients */
13209     /* --------------------------------------------------- */
13210 
13211     /* The units for the sine and cosine coefficients are */
13212     /* 0.1 microarcsec and the same per Julian century    */
13213 
13214         final class LSNutationModel 
13215         {
13216           final int nl,nlp,nf,nd,nom; /* coefficients of l,l',F,D,Om */
13217           final double ps,pst,pc;     /* longitude sin, t*sin, cos coefficients */
13218           final double ec,ect,es;     /* obliquity cos, t*cos, sin coefficients */
13219           
13220           public LSNutationModel( int nl,int nlp,int nf,int nd,int nom,
13221           double ps, double pst, double pc,    
13222           double ec, double ect, double es    ) {
13223                this.nl = nl;this.nlp = nlp;this.nf = nf;this.nd = nd;this.nom = nom;
13224                this.ps = ps;this.pst = pst;this.pc = pc;    
13225                this.ec = ec;this.ect = ect; this.es= es;    
13226         }
13227 
13228        }
13229         LSNutationModel x[] = {
13230 
13231        /* 1-10 */
13232           new LSNutationModel( 0, 0, 0, 0,1,
13233              -172064161.0, -174666.0, 33386.0, 92052331.0, 9086.0, 15377.0),
13234           new LSNutationModel( 0, 0, 2,-2,2,
13235                -13170906.0, -1675.0, -13696.0, 5730336.0, -3015.0, -4587.0),
13236           new LSNutationModel( 0, 0, 2, 0,2,-2276413.0,-234.0, 2796.0, 978459.0,-485.0,1374.0),
13237           new LSNutationModel( 0, 0, 0, 0,2,2074554.0,  207.0, -698.0,-897492.0, 470.0,-291.0),
13238           new LSNutationModel( 0, 1, 0, 0,0,1475877.0,-3633.0,11817.0, 73871.0,-184.0,-1924.0),
13239           new LSNutationModel( 0, 1, 2,-2,2,-516821.0, 1226.0, -524.0, 224386.0,-677.0,-174.0),
13240           new LSNutationModel( 1, 0, 0, 0,0, 711159.0,   73.0, -872.0,  -6750.0,   0.0, 358.0),
13241           new LSNutationModel( 0, 0, 2, 0,1,-387298.0, -367.0,  380.0, 200728.0,  18.0, 318.0),
13242           new LSNutationModel( 1, 0, 2, 0,2,-301461.0,  -36.0,  816.0, 129025.0, -63.0, 367.0),
13243           new LSNutationModel( 0,-1, 2,-2,2, 215829.0, -494.0,  111.0, -95929.0, 299.0, 132.0),
13244 
13245        /* 11-20 */
13246           new LSNutationModel( 0, 0, 2,-2,1, 128227.0,  137.0,  181.0, -68982.0,  -9.0,  39.0),
13247           new LSNutationModel(-1, 0, 2, 0,2, 123457.0,   11.0,   19.0, -53311.0,  32.0,  -4.0),
13248           new LSNutationModel(-1, 0, 0, 2,0, 156994.0,   10.0, -168.0,  -1235.0,   0.0,  82.0),
13249           new LSNutationModel( 1, 0, 0, 0,1,  63110.0,   63.0,   27.0, -33228.0,   0.0,  -9.0),
13250           new LSNutationModel(-1, 0, 0, 0,1, -57976.0,  -63.0, -189.0,  31429.0,   0.0, -75.0),
13251           new LSNutationModel(-1, 0, 2, 2,2, -59641.0,  -11.0,  149.0,  25543.0, -11.0,  66.0),
13252           new LSNutationModel( 1, 0, 2, 0,1, -51613.0,  -42.0,  129.0,  26366.0,   0.0,  78.0),
13253           new LSNutationModel(-2, 0, 2, 0,1,  45893.0,   50.0,   31.0, -24236.0, -10.0,  20.0),
13254           new LSNutationModel( 0, 0, 0, 2,0,  63384.0,   11.0, -150.0,  -1220.0,   0.0,  29.0),
13255           new LSNutationModel( 0, 0, 2, 2,2, -38571.0,   -1.0,  158.0,  16452.0, -11.0,  68.0),
13256 
13257        /* 21-30 */
13258           new LSNutationModel( 0,-2, 2,-2,2,  32481.0,    0.0,    0.0, -13870.0,   0.0,   0.0),
13259           new LSNutationModel(-2, 0, 0, 2,0, -47722.0,    0.0,  -18.0,    477.0,   0.0, -25.0),
13260           new LSNutationModel( 2, 0, 2, 0,2, -31046.0,   -1.0,  131.0,  13238.0, -11.0,  59.0),
13261           new LSNutationModel( 1, 0, 2,-2,2,  28593.0,    0.0,   -1.0, -12338.0,  10.0,  -3.0),
13262           new LSNutationModel(-1, 0, 2, 0,1,  20441.0,   21.0,   10.0, -10758.0,   0.0,  -3.0),
13263           new LSNutationModel( 2, 0, 0, 0,0,  29243.0,    0.0,  -74.0,   -609.0,   0.0,  13.0),
13264           new LSNutationModel( 0, 0, 2, 0,0,  25887.0,    0.0,  -66.0,   -550.0,   0.0,  11.0),
13265           new LSNutationModel( 0, 1, 0, 0,1, -14053.0,  -25.0,   79.0,   8551.0,  -2.0, -45.0),
13266           new LSNutationModel(-1, 0, 0, 2,1,  15164.0,   10.0,   11.0,  -8001.0,   0.0,  -1.0),
13267           new LSNutationModel( 0, 2, 2,-2,2, -15794.0,   72.0,  -16.0,   6850.0, -42.0,  -5.0),
13268 
13269        /* 31-40 */
13270           new LSNutationModel( 0, 0,-2, 2,0,  21783.0,    0.0,   13.0,   -167.0,   0.0,  13.0),
13271           new LSNutationModel( 1, 0, 0,-2,1, -12873.0,  -10.0,  -37.0,   6953.0,   0.0, -14.0),
13272           new LSNutationModel( 0,-1, 0, 0,1, -12654.0,   11.0,   63.0,   6415.0,   0.0,  26.0),
13273           new LSNutationModel(-1, 0, 2, 2,1, -10204.0,    0.0,   25.0,   5222.0,   0.0,  15.0),
13274           new LSNutationModel( 0, 2, 0, 0,0,  16707.0,  -85.0,  -10.0,    168.0,  -1.0,  10.0),
13275           new LSNutationModel( 1, 0, 2, 2,2,  -7691.0,    0.0,   44.0,   3268.0,   0.0,  19.0),
13276           new LSNutationModel(-2, 0, 2, 0,0, -11024.0,    0.0,  -14.0,    104.0,   0.0,   2.0),
13277           new LSNutationModel( 0, 1, 2, 0,2,   7566.0,  -21.0,  -11.0,  -3250.0,   0.0,  -5.0),
13278           new LSNutationModel( 0, 0, 2, 2,1,  -6637.0,  -11.0,   25.0,   3353.0,   0.0,  14.0),
13279           new LSNutationModel( 0,-1, 2, 0,2,  -7141.0,   21.0,    8.0,   3070.0,   0.0,   4.0),
13280 
13281        /* 41-50 */
13282           new LSNutationModel( 0, 0, 0, 2,1,  -6302.0,  -11.0,    2.0,   3272.0,   0.0,   4.0),
13283           new LSNutationModel( 1, 0, 2,-2,1,   5800.0,   10.0,    2.0,  -3045.0,   0.0,  -1.0),
13284           new LSNutationModel( 2, 0, 2,-2,2,   6443.0,    0.0,   -7.0,  -2768.0,   0.0,  -4.0),
13285           new LSNutationModel(-2, 0, 0, 2,1,  -5774.0,  -11.0,  -15.0,   3041.0,   0.0,  -5.0),
13286           new LSNutationModel( 2, 0, 2, 0,1,  -5350.0,    0.0,   21.0,   2695.0,   0.0,  12.0),
13287           new LSNutationModel( 0,-1, 2,-2,1,  -4752.0,  -11.0,   -3.0,   2719.0,   0.0,  -3.0),
13288           new LSNutationModel( 0, 0, 0,-2,1,  -4940.0,  -11.0,  -21.0,   2720.0,   0.0,  -9.0),
13289           new LSNutationModel(-1,-1, 0, 2,0,   7350.0,    0.0,   -8.0,    -51.0,   0.0,   4.0),
13290           new LSNutationModel( 2, 0, 0,-2,1,   4065.0,    0.0,    6.0,  -2206.0,   0.0,   1.0),
13291           new LSNutationModel( 1, 0, 0, 2,0,   6579.0,    0.0,  -24.0,   -199.0,   0.0,   2.0),
13292 
13293        /* 51-60 */
13294           new LSNutationModel( 0, 1, 2,-2,1,   3579.0,    0.0,    5.0,  -1900.0,   0.0,   1.0),
13295           new LSNutationModel( 1,-1, 0, 0,0,   4725.0,    0.0,   -6.0,    -41.0,   0.0,   3.0),
13296           new LSNutationModel(-2, 0, 2, 0,2,  -3075.0,    0.0,   -2.0,   1313.0,   0.0,  -1.0),
13297           new LSNutationModel( 3, 0, 2, 0,2,  -2904.0,    0.0,   15.0,   1233.0,   0.0,   7.0),
13298           new LSNutationModel( 0,-1, 0, 2,0,   4348.0,    0.0,  -10.0,    -81.0,   0.0,   2.0),
13299           new LSNutationModel( 1,-1, 2, 0,2,  -2878.0,    0.0,    8.0,   1232.0,   0.0,   4.0),
13300           new LSNutationModel( 0, 0, 0, 1,0,  -4230.0,    0.0,    5.0,    -20.0,   0.0,  -2.0),
13301           new LSNutationModel(-1,-1, 2, 2,2,  -2819.0,    0.0,    7.0,   1207.0,   0.0,   3.0),
13302           new LSNutationModel(-1, 0, 2, 0,0,  -4056.0,    0.0,    5.0,     40.0,   0.0,  -2.0),
13303           new LSNutationModel( 0,-1, 2, 2,2,  -2647.0,    0.0,   11.0,   1129.0,   0.0,   5.0),
13304 
13305        /* 61-70 */
13306           new LSNutationModel(-2, 0, 0, 0,1,  -2294.0,    0.0,  -10.0,   1266.0,   0.0,  -4.0),
13307           new LSNutationModel( 1, 1, 2, 0,2,   2481.0,    0.0,   -7.0,  -1062.0,   0.0,  -3.0),
13308           new LSNutationModel( 2, 0, 0, 0,1,   2179.0,    0.0,   -2.0,  -1129.0,   0.0,  -2.0),
13309           new LSNutationModel(-1, 1, 0, 1,0,   3276.0,    0.0,    1.0,     -9.0,   0.0,   0.0),
13310           new LSNutationModel( 1, 1, 0, 0,0,  -3389.0,    0.0,    5.0,     35.0,   0.0,  -2.0),
13311           new LSNutationModel( 1, 0, 2, 0,0,   3339.0,    0.0,  -13.0,   -107.0,   0.0,   1.0),
13312           new LSNutationModel(-1, 0, 2,-2,1,  -1987.0,    0.0,   -6.0,   1073.0,   0.0,  -2.0),
13313           new LSNutationModel( 1, 0, 0, 0,2,  -1981.0,    0.0,    0.0,    854.0,   0.0,   0.0),
13314           new LSNutationModel(-1, 0, 0, 1,0,   4026.0,    0.0, -353.0,   -553.0,   0.0,-139.0),
13315           new LSNutationModel( 0, 0, 2, 1,2,   1660.0,    0.0,   -5.0,   -710.0,   0.0,  -2.0),
13316 
13317        /* 71-77 */
13318           new LSNutationModel(-1, 0, 2, 4,2,  -1521.0,    0.0,    9.0,    647.0,   0.0,   4.0),
13319           new LSNutationModel(-1, 1, 0, 1,1,   1314.0,    0.0,    0.0,   -700.0,   0.0,   0.0),
13320           new LSNutationModel( 0,-2, 2,-2,1,  -1283.0,    0.0,    0.0,    672.0,   0.0,   0.0),
13321           new LSNutationModel( 1, 0, 2, 2,1,  -1331.0,    0.0,    8.0,    663.0,   0.0,   4.0),
13322           new LSNutationModel(-2, 0, 2, 2,2,   1383.0,    0.0,   -2.0,   -594.0,   0.0,  -2.0),
13323           new LSNutationModel(-1, 0, 0, 0,2,   1405.0,    0.0,    4.0,   -610.0,   0.0,   2.0),
13324           new LSNutationModel( 1, 1, 2,-2,2,   1290.0,    0.0,    0.0,   -556.0,   0.0,   0.0)
13325        };
13326 
13327     /* Number of terms in the series */
13328        final int NLS = x.length;
13329 
13330     /*--------------------------------------------------------------------*/
13331 
13332     /* Interval between fundamental epoch J2000.0 and given date (JC). */
13333        t = ((date1 - DJ00) + date2) / DJC;
13334 
13335     /* --------------------*/
13336     /* LUNI-SOLAR NUTATION */
13337     /* --------------------*/
13338 
13339     /* Fundamental (Delaunay) arguments from Simon et al. (1994) */
13340 
13341     /* Mean anomaly of the Moon. */
13342        el = fmod(485868.249036 + (1717915923.2178) * t, TURNAS) * DAS2R;
13343 
13344     /* Mean anomaly of the Sun. */
13345        elp = fmod(1287104.79305 + (129596581.0481) * t, TURNAS) * DAS2R;
13346 
13347     /* Mean argument of the latitude of the Moon. */
13348        f = fmod(335779.526232 + (1739527262.8478) * t, TURNAS) * DAS2R;
13349 
13350     /* Mean elongation of the Moon from the Sun. */
13351        d = fmod(1072260.70369 + (1602961601.2090) * t, TURNAS) * DAS2R;
13352 
13353     /* Mean longitude of the ascending node of the Moon. */
13354        om = fmod(450160.398036 + (-6962890.5431) * t, TURNAS) * DAS2R;
13355 
13356     /* Initialize the nutation values. */
13357        dp = 0.0;
13358        de = 0.0;
13359 
13360     /* Summation of luni-solar nutation series (smallest terms first). */
13361        for (i = NLS-1; i >= 0; i--) {
13362 
13363        /* Argument and functions. */
13364           arg = fmod( (double)x[i].nl  * el  +
13365                       (double)x[i].nlp * elp +
13366                       (double)x[i].nf  * f   +
13367                       (double)x[i].nd  * d   +
13368                       (double)x[i].nom * om, D2PI  );
13369           sarg = sin(arg);
13370           carg = cos(arg);
13371 
13372        /* Term. */
13373           dp += (x[i].ps + x[i].pst * t) * sarg + x[i].pc * carg;
13374           de += (x[i].ec + x[i].ect * t) * carg + x[i].es * sarg;
13375        }
13376 
13377     /* Convert from 0.1 microarcsec units to radians. */
13378        dpsils = dp * U2R;
13379        depsls = de * U2R;
13380 
13381     /* ------------------------------*/
13382     /* IN LIEU OF PLANETARY NUTATION */
13383     /* ------------------------------*/
13384 
13385     /* Fixed offset to correct for missing terms in truncated series. */
13386        dpsipl = DPPLAN;
13387        depspl = DEPLAN;
13388 
13389     /* --------*/
13390     /* RESULTS */
13391     /* --------*/
13392 
13393     /* Add luni-solar and planetary components. */
13394        return new NutationTerms(   dpsils + dpsipl,
13395                                 depsls + depspl);
13396 
13397     }
13398     
13399 
13400     /**
13401     *  IAU 2000A nutation with adjustments to match the IAU 2006
13402     *  precession.
13403     *
13404     *<!-- Given: -->
13405     *     @param date1 double TT as a 2-part Julian Date (Note 1)
13406     *     @param date2 double TT as a 2-part Julian Date (Note 1)
13407     *
13408     *<!-- Returned: -->
13409     *     @return  nutation, luni-solar + planetary (Note 2)
13410     *
13411     *<p>Status:  canonical model.
13412     *
13413     * <p>Notes:
13414     * <ol>
13415     *
13416     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
13417     *     convenient way between the two arguments.  For example,
13418     *     JD(TT)=2450123.7 could be expressed in any of these ways,
13419     *     among others:
13420     *<pre>
13421     *            date1          date2
13422     *
13423     *         2450123.7           0.0       (JD method)
13424     *         2451545.0       -1421.3       (J2000 method)
13425     *         2400000.5       50123.2       (MJD method)
13426     *         2450123.5           0.2       (date &amp; time method)
13427     *</pre>
13428     *     The JD method is the most natural and convenient to use in
13429     *     cases where the loss of several decimal digits of resolution
13430     *     is acceptable.  The J2000 method is best matched to the way
13431     *     the argument is handled internally and will deliver the
13432     *     optimum resolution.  The MJD method and the date &amp; time methods
13433     *     are both good compromises between resolution and convenience.
13434     *
13435     * <li> The nutation components in longitude and obliquity are in radians
13436     *     and with respect to the mean equinox and ecliptic of date,
13437     *     IAU 2006 precession model (Hilton et al. 2006, Capitaine et al.
13438     *     2005).
13439     *
13440     * <li> The function first computes the IAU 2000A nutation, then applies
13441     *     adjustments for (i) the consequences of the change in obliquity
13442     *     from the IAU 1980 ecliptic to the IAU 2006 ecliptic and (ii) the
13443     *     secular variation in the Earth's dynamical flattening.
13444     *
13445     * <li> The present function provides classical nutation, complementing
13446     *     the IAU 2000 frame bias and IAU 2006 precession.  It delivers a
13447     *     pole which is at current epochs accurate to a few tens of
13448     *     microarcseconds, apart from the free core nutation.
13449     *</ol>
13450     *<p>Called:<ul>
13451     *     <li>{@link #jauNut00a} nutation, IAU 2000A
13452     * </ul>
13453     *<p>References:
13454     *
13455     *     <p>Chapront, J., Chapront-Touze, M. &amp; Francou, G. 2002,
13456     *     Astron.Astrophys. 387, 700
13457     *
13458     *     <p>Lieske, J.H., Lederle, T., Fricke, W. &amp; Morando, B. 1977,
13459     *     Astron.Astrophys. 58, 1-16
13460     *
13461     *     <p>Mathews, P.M., Herring, T.A., Buffet, B.A. 2002, J.Geophys.Res.
13462     *     107, B4.  The MHB_2000 code itself was obtained on 9th September
13463     *     2002 from ftp//maia.usno.navy.mil/conv2000/chapter5/IAU2000A.
13464     *
13465     *     <p>Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
13466     *     Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
13467     *
13468     *     <p>Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
13469     *     Astron.Astrophys.Supp.Ser. 135, 111
13470     *
13471     *    <p>Wallace, P.T., "Software for Implementing the IAU 2000
13472     *     Resolutions", in IERS Workshop 5.1 (2002)
13473     *
13474     *@version 2008 May 24
13475     *
13476     *  @since Release 20101201
13477     *
13478     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
13479     */
13480     public static NutationTerms jauNut06a(double date1, double date2)
13481     {
13482        double t, fj2;
13483 
13484 
13485     /* Interval between fundamental date J2000.0 and given date (JC). */
13486        t = ((date1 - DJ00) + date2) / DJC;
13487 
13488     /* Factor correcting for secular variation of J2. */
13489        fj2 = -2.7774e-6 * t;
13490 
13491     /* Obtain IAU 2000A nutation. */
13492        NutationTerms nt = jauNut00a(date1, date2);
13493        
13494     /* Apply P03 adjustments (Wallace &amp; Capitaine, 2006, Eqs.5). */
13495        return new NutationTerms( nt.dpsi + nt.dpsi * (0.4697e-6 + fj2),
13496                                  nt.deps + nt.deps * fj2);
13497 
13498      }
13499     
13500     /**
13501     *  Nutation, IAU 1980 model.
13502     *
13503     *<p>This function is derived from the International Astronomical Union's
13504     *  SOFA (Standards Of Fundamental Astronomy) software collection.
13505     *
13506     *<p>Status:  canonical model.
13507     *
13508     *<!-- Given: -->
13509     *     @param date1 double TT as a 2-part Julian Date (Note 1)
13510     *     @param date2 double TT as a 2-part Julian Date (Note 1)
13511     *
13512     *<!-- Returned: -->
13513     *     @return dpsi           double      <u>returned</u> nutation in longitude (radians)
13514     *             deps           double      <u>returned</u> nutation in obliquity (radians)
13515     *
13516     * <p>Notes:
13517     * <ol>
13518     *
13519     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
13520     *     convenient way between the two arguments.  For example,
13521     *     JD(TT)=2450123.7 could be expressed in any of these ways,
13522     *     among others:
13523     *<pre>
13524     *            date1          date2
13525     *
13526     *         2450123.7           0.0       (JD method)
13527     *         2451545.0       -1421.3       (J2000 method)
13528     *         2400000.5       50123.2       (MJD method)
13529     *         2450123.5           0.2       (date &amp; time method)
13530     *</pre>
13531     *     The JD method is the most natural and convenient to use in
13532     *     cases where the loss of several decimal digits of resolution
13533     *     is acceptable.  The J2000 method is best matched to the way
13534     *     the argument is handled internally and will deliver the
13535     *     optimum resolution.  The MJD method and the date &amp; time methods
13536     *     are both good compromises between resolution and convenience.
13537     *
13538     * <li> The nutation components are with respect to the ecliptic of
13539     *     date.
13540     *</ol>
13541     *<p>Called:<ul>
13542     *     <li>{@link #jauAnpm} normalize angle into range +/- pi
13543     * </ul>
13544     *<p>Reference:
13545     *
13546     *     <p>Explanatory Supplement to the Astronomical Almanac,
13547     *     P. Kenneth Seidelmann (ed), University Science Books (1992),
13548     *     Section 3.222 (p111).
13549     *
13550     *@version 2008 September 30
13551     *
13552     *  @since Release 20101201
13553     *
13554     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
13555     */
13556     public static NutationTerms jauNut80(double date1, double date2)
13557     {
13558        double t, el, elp, f, d, om, dp, de, arg, s, c;
13559        int j;
13560 
13561     /* Units of 0.1 milliarcsecond to radians */
13562        final double U2R = DAS2R / 1e4;
13563 
13564     /* ------------------------------------------------ */
13565     /* Table of multiples of arguments and coefficients */
13566     /* ------------------------------------------------ */
13567 
13568     /* The units for the sine and cosine coefficients are 0.1 mas and */
13569     /* the same per Julian century */
13570 
13571        final class NutationModel {
13572           final int nl,nlp,nf,nd,nom; /* coefficients of l,l',F,D,Om */
13573           final double sp,spt;        /* longitude sine, 1 and t coefficients */
13574           final double ce,cet;        /* obliquity cosine, 1 and t coefficients */
13575           
13576           public NutationModel(int nl,int nlp,int nf,int nd,int nom,
13577           double sp,double spt,       
13578           double ce,double cet       ) {
13579                this.nl = nl;this.nlp = nlp;this.nf = nf;this.nd = nd;this.nom = nom;
13580                this.sp = sp;this.spt = spt;      
13581                this.ce = ce;this.cet = cet;     
13582         }
13583        }
13584        NutationModel x[] = {
13585 
13586        /* 1-10 */
13587           new NutationModel(  0,  0,  0,  0,  1, -171996.0, -174.2,  92025.0,    8.9 ),
13588           new NutationModel(  0,  0,  0,  0,  2,    2062.0,    0.2,   -895.0,    0.5 ),
13589           new NutationModel( -2,  0,  2,  0,  1,      46.0,    0.0,    -24.0,    0.0 ),
13590           new NutationModel(  2,  0, -2,  0,  0,      11.0,    0.0,      0.0,    0.0 ),
13591           new NutationModel( -2,  0,  2,  0,  2,      -3.0,    0.0,      1.0,    0.0 ),
13592           new NutationModel(  1, -1,  0, -1,  0,      -3.0,    0.0,      0.0,    0.0 ),
13593           new NutationModel(  0, -2,  2, -2,  1,      -2.0,    0.0,      1.0,    0.0 ),
13594           new NutationModel(  2,  0, -2,  0,  1,       1.0,    0.0,      0.0,    0.0 ),
13595           new NutationModel(  0,  0,  2, -2,  2,  -13187.0,   -1.6,   5736.0,   -3.1 ),
13596           new NutationModel(  0,  1,  0,  0,  0,    1426.0,   -3.4,     54.0,   -0.1 ),
13597 
13598        /* 11-20 */
13599           new NutationModel(  0,  1,  2, -2,  2,    -517.0,    1.2,    224.0,   -0.6 ),
13600           new NutationModel(  0, -1,  2, -2,  2,     217.0,   -0.5,    -95.0,    0.3 ),
13601           new NutationModel(  0,  0,  2, -2,  1,     129.0,    0.1,    -70.0,    0.0 ),
13602           new NutationModel(  2,  0,  0, -2,  0,      48.0,    0.0,      1.0,    0.0 ),
13603           new NutationModel(  0,  0,  2, -2,  0,     -22.0,    0.0,      0.0,    0.0 ),
13604           new NutationModel(  0,  2,  0,  0,  0,      17.0,   -0.1,      0.0,    0.0 ),
13605           new NutationModel(  0,  1,  0,  0,  1,     -15.0,    0.0,      9.0,    0.0 ),
13606           new NutationModel(  0,  2,  2, -2,  2,     -16.0,    0.1,      7.0,    0.0 ),
13607           new NutationModel(  0, -1,  0,  0,  1,     -12.0,    0.0,      6.0,    0.0 ),
13608           new NutationModel( -2,  0,  0,  2,  1,      -6.0,    0.0,      3.0,    0.0 ),
13609 
13610        /* 21-30 */
13611           new NutationModel(  0, -1,  2, -2,  1,      -5.0,    0.0,      3.0,    0.0 ),
13612           new NutationModel(  2,  0,  0, -2,  1,       4.0,    0.0,     -2.0,    0.0 ),
13613           new NutationModel(  0,  1,  2, -2,  1,       4.0,    0.0,     -2.0,    0.0 ),
13614           new NutationModel(  1,  0,  0, -1,  0,      -4.0,    0.0,      0.0,    0.0 ),
13615           new NutationModel(  2,  1,  0, -2,  0,       1.0,    0.0,      0.0,    0.0 ),
13616           new NutationModel(  0,  0, -2,  2,  1,       1.0,    0.0,      0.0,    0.0 ),
13617           new NutationModel(  0,  1, -2,  2,  0,      -1.0,    0.0,      0.0,    0.0 ),
13618           new NutationModel(  0,  1,  0,  0,  2,       1.0,    0.0,      0.0,    0.0 ),
13619           new NutationModel( -1,  0,  0,  1,  1,       1.0,    0.0,      0.0,    0.0 ),
13620           new NutationModel(  0,  1,  2, -2,  0,      -1.0,    0.0,      0.0,    0.0 ),
13621 
13622        /* 31-40 */
13623           new NutationModel(  0,  0,  2,  0,  2,   -2274.0,   -0.2,    977.0,   -0.5 ),
13624           new NutationModel(  1,  0,  0,  0,  0,     712.0,    0.1,     -7.0,    0.0 ),
13625           new NutationModel(  0,  0,  2,  0,  1,    -386.0,   -0.4,    200.0,    0.0 ),
13626           new NutationModel(  1,  0,  2,  0,  2,    -301.0,    0.0,    129.0,   -0.1 ),
13627           new NutationModel(  1,  0,  0, -2,  0,    -158.0,    0.0,     -1.0,    0.0 ),
13628           new NutationModel( -1,  0,  2,  0,  2,     123.0,    0.0,    -53.0,    0.0 ),
13629           new NutationModel(  0,  0,  0,  2,  0,      63.0,    0.0,     -2.0,    0.0 ),
13630           new NutationModel(  1,  0,  0,  0,  1,      63.0,    0.1,    -33.0,    0.0 ),
13631           new NutationModel( -1,  0,  0,  0,  1,     -58.0,   -0.1,     32.0,    0.0 ),
13632           new NutationModel( -1,  0,  2,  2,  2,     -59.0,    0.0,     26.0,    0.0 ),
13633 
13634        /* 41-50 */
13635           new NutationModel(  1,  0,  2,  0,  1,     -51.0,    0.0,     27.0,    0.0 ),
13636           new NutationModel(  0,  0,  2,  2,  2,     -38.0,    0.0,     16.0,    0.0 ),
13637           new NutationModel(  2,  0,  0,  0,  0,      29.0,    0.0,     -1.0,    0.0 ),
13638           new NutationModel(  1,  0,  2, -2,  2,      29.0,    0.0,    -12.0,    0.0 ),
13639           new NutationModel(  2,  0,  2,  0,  2,     -31.0,    0.0,     13.0,    0.0 ),
13640           new NutationModel(  0,  0,  2,  0,  0,      26.0,    0.0,     -1.0,    0.0 ),
13641           new NutationModel( -1,  0,  2,  0,  1,      21.0,    0.0,    -10.0,    0.0 ),
13642           new NutationModel( -1,  0,  0,  2,  1,      16.0,    0.0,     -8.0,    0.0 ),
13643           new NutationModel(  1,  0,  0, -2,  1,     -13.0,    0.0,      7.0,    0.0 ),
13644           new NutationModel( -1,  0,  2,  2,  1,     -10.0,    0.0,      5.0,    0.0 ),
13645 
13646        /* 51-60 */
13647           new NutationModel(  1,  1,  0, -2,  0,      -7.0,    0.0,      0.0,    0.0 ),
13648           new NutationModel(  0,  1,  2,  0,  2,       7.0,    0.0,     -3.0,    0.0 ),
13649           new NutationModel(  0, -1,  2,  0,  2,      -7.0,    0.0,      3.0,    0.0 ),
13650           new NutationModel(  1,  0,  2,  2,  2,      -8.0,    0.0,      3.0,    0.0 ),
13651           new NutationModel(  1,  0,  0,  2,  0,       6.0,    0.0,      0.0,    0.0 ),
13652           new NutationModel(  2,  0,  2, -2,  2,       6.0,    0.0,     -3.0,    0.0 ),
13653           new NutationModel(  0,  0,  0,  2,  1,      -6.0,    0.0,      3.0,    0.0 ),
13654           new NutationModel(  0,  0,  2,  2,  1,      -7.0,    0.0,      3.0,    0.0 ),
13655           new NutationModel(  1,  0,  2, -2,  1,       6.0,    0.0,     -3.0,    0.0 ),
13656           new NutationModel(  0,  0,  0, -2,  1,      -5.0,    0.0,      3.0,    0.0 ),
13657 
13658        /* 61-70 */
13659           new NutationModel(  1, -1,  0,  0,  0,       5.0,    0.0,      0.0,    0.0 ),
13660           new NutationModel(  2,  0,  2,  0,  1,      -5.0,    0.0,      3.0,    0.0 ),
13661           new NutationModel(  0,  1,  0, -2,  0,      -4.0,    0.0,      0.0,    0.0 ),
13662           new NutationModel(  1,  0, -2,  0,  0,       4.0,    0.0,      0.0,    0.0 ),
13663           new NutationModel(  0,  0,  0,  1,  0,      -4.0,    0.0,      0.0,    0.0 ),
13664           new NutationModel(  1,  1,  0,  0,  0,      -3.0,    0.0,      0.0,    0.0 ),
13665           new NutationModel(  1,  0,  2,  0,  0,       3.0,    0.0,      0.0,    0.0 ),
13666           new NutationModel(  1, -1,  2,  0,  2,      -3.0,    0.0,      1.0,    0.0 ),
13667           new NutationModel( -1, -1,  2,  2,  2,      -3.0,    0.0,      1.0,    0.0 ),
13668           new NutationModel( -2,  0,  0,  0,  1,      -2.0,    0.0,      1.0,    0.0 ),
13669 
13670        /* 71-80 */
13671           new NutationModel(  3,  0,  2,  0,  2,      -3.0,    0.0,      1.0,    0.0 ),
13672           new NutationModel(  0, -1,  2,  2,  2,      -3.0,    0.0,      1.0,    0.0 ),
13673           new NutationModel(  1,  1,  2,  0,  2,       2.0,    0.0,     -1.0,    0.0 ),
13674           new NutationModel( -1,  0,  2, -2,  1,      -2.0,    0.0,      1.0,    0.0 ),
13675           new NutationModel(  2,  0,  0,  0,  1,       2.0,    0.0,     -1.0,    0.0 ),
13676           new NutationModel(  1,  0,  0,  0,  2,      -2.0,    0.0,      1.0,    0.0 ),
13677           new NutationModel(  3,  0,  0,  0,  0,       2.0,    0.0,      0.0,    0.0 ),
13678           new NutationModel(  0,  0,  2,  1,  2,       2.0,    0.0,     -1.0,    0.0 ),
13679           new NutationModel( -1,  0,  0,  0,  2,       1.0,    0.0,     -1.0,    0.0 ),
13680           new NutationModel(  1,  0,  0, -4,  0,      -1.0,    0.0,      0.0,    0.0 ),
13681 
13682        /* 81-90 */
13683           new NutationModel( -2,  0,  2,  2,  2,       1.0,    0.0,     -1.0,    0.0 ),
13684           new NutationModel( -1,  0,  2,  4,  2,      -2.0,    0.0,      1.0,    0.0 ),
13685           new NutationModel(  2,  0,  0, -4,  0,      -1.0,    0.0,      0.0,    0.0 ),
13686           new NutationModel(  1,  1,  2, -2,  2,       1.0,    0.0,     -1.0,    0.0 ),
13687           new NutationModel(  1,  0,  2,  2,  1,      -1.0,    0.0,      1.0,    0.0 ),
13688           new NutationModel( -2,  0,  2,  4,  2,      -1.0,    0.0,      1.0,    0.0 ),
13689           new NutationModel( -1,  0,  4,  0,  2,       1.0,    0.0,      0.0,    0.0 ),
13690           new NutationModel(  1, -1,  0, -2,  0,       1.0,    0.0,      0.0,    0.0 ),
13691           new NutationModel(  2,  0,  2, -2,  1,       1.0,    0.0,     -1.0,    0.0 ),
13692           new NutationModel(  2,  0,  2,  2,  2,      -1.0,    0.0,      0.0,    0.0 ),
13693 
13694        /* 91-100 */
13695           new NutationModel(  1,  0,  0,  2,  1,      -1.0,    0.0,      0.0,    0.0 ),
13696           new NutationModel(  0,  0,  4, -2,  2,       1.0,    0.0,      0.0,    0.0 ),
13697           new NutationModel(  3,  0,  2, -2,  2,       1.0,    0.0,      0.0,    0.0 ),
13698           new NutationModel(  1,  0,  2, -2,  0,      -1.0,    0.0,      0.0,    0.0 ),
13699           new NutationModel(  0,  1,  2,  0,  1,       1.0,    0.0,      0.0,    0.0 ),
13700           new NutationModel( -1, -1,  0,  2,  1,       1.0,    0.0,      0.0,    0.0 ),
13701           new NutationModel(  0,  0, -2,  0,  1,      -1.0,    0.0,      0.0,    0.0 ),
13702           new NutationModel(  0,  0,  2, -1,  2,      -1.0,    0.0,      0.0,    0.0 ),
13703           new NutationModel(  0,  1,  0,  2,  0,      -1.0,    0.0,      0.0,    0.0 ),
13704           new NutationModel(  1,  0, -2, -2,  0,      -1.0,    0.0,      0.0,    0.0 ),
13705 
13706        /* 101-106 */
13707           new NutationModel(  0, -1,  2,  0,  1,      -1.0,    0.0,      0.0,    0.0 ),
13708           new NutationModel(  1,  1,  0, -2,  1,      -1.0,    0.0,      0.0,    0.0 ),
13709           new NutationModel(  1,  0, -2,  2,  0,      -1.0,    0.0,      0.0,    0.0 ),
13710           new NutationModel(  2,  0,  0,  2,  0,       1.0,    0.0,      0.0,    0.0 ),
13711           new NutationModel(  0,  0,  2,  4,  2,      -1.0,    0.0,      0.0,    0.0 ),
13712           new NutationModel(  0,  1,  0,  1,  0,       1.0,    0.0,      0.0,    0.0 )
13713        };
13714 
13715     /* Number of terms in the series */
13716        final int NT = x.length;
13717 
13718     /*--------------------------------------------------------------------*/
13719 
13720     /* Interval between fundamental epoch J2000.0 and given date (JC). */
13721        t = ((date1 - DJ00) + date2) / DJC;
13722 
13723     /* --------------------- */
13724     /* Fundamental arguments */
13725     /* --------------------- */
13726 
13727     /* Mean longitude of Moon minus mean longitude of Moon's perigee. */
13728        el = jauAnpm(
13729             (485866.733 + (715922.633 + (31.310 + 0.064 * t) * t) * t)
13730             * DAS2R + fmod(1325.0 * t, 1.0) * D2PI);
13731 
13732     /* Mean longitude of Sun minus mean longitude of Sun's perigee. */
13733        elp = jauAnpm(
13734              (1287099.804 + (1292581.224 + (-0.577 - 0.012 * t) * t) * t)
13735              * DAS2R + fmod(99.0 * t, 1.0) * D2PI);
13736 
13737     /* Mean longitude of Moon minus mean longitude of Moon's node. */
13738        f = jauAnpm(
13739            (335778.877 + (295263.137 + (-13.257 + 0.011 * t) * t) * t)
13740            * DAS2R + fmod(1342.0 * t, 1.0) * D2PI);
13741 
13742     /* Mean elongation of Moon from Sun. */
13743        d = jauAnpm(
13744            (1072261.307 + (1105601.328 + (-6.891 + 0.019 * t) * t) * t)
13745            * DAS2R + fmod(1236.0 * t, 1.0) * D2PI);
13746 
13747     /* Longitude of the mean ascending node of the lunar orbit on the */
13748     /* ecliptic, measured from the mean equinox of date. */
13749        om = jauAnpm(
13750             (450160.280 + (-482890.539 + (7.455 + 0.008 * t) * t) * t)
13751             * DAS2R + fmod(-5.0 * t, 1.0) * D2PI);
13752 
13753     /* --------------- */
13754     /* Nutation series */
13755     /* --------------- */
13756 
13757     /* Initialize nutation components. */
13758        dp = 0.0;
13759        de = 0.0;
13760 
13761     /* Sum the nutation terms, ending with the biggest. */
13762        for (j = NT-1; j >= 0; j--) {
13763 
13764        /* Form argument for current term. */
13765           arg = (double)x[j].nl  * el
13766               + (double)x[j].nlp * elp
13767               + (double)x[j].nf  * f
13768               + (double)x[j].nd  * d
13769               + (double)x[j].nom * om;
13770 
13771        /* Accumulate current nutation term. */
13772           s = x[j].sp + x[j].spt * t;
13773           c = x[j].ce + x[j].cet * t;
13774           if (s != 0.0) dp += s * sin(arg);
13775           if (c != 0.0) de += c * cos(arg);
13776        }
13777 
13778     /* Convert results from 0.1 mas units to radians. */
13779        return new NutationTerms( dp * U2R,
13780                                  de * U2R);
13781 
13782         }
13783     
13784 
13785     /**
13786     *  Form the matrix of nutation for a given date, IAU 1980 model.
13787     *
13788     *<p>This function is derived from the International Astronomical Union's
13789     *  SOFA (Standards Of Fundamental Astronomy) software collection.
13790     *
13791     *<p>Status:  support function.
13792     *
13793     *<!-- Given: -->
13794     *     @param date1 double           TDB date (Note 1)
13795     *     @param date2 double           TDB date (Note 1) 
13796     *
13797     *<!-- Returned: -->
13798     *     @return           double[3][3]       nutation matrix
13799     *
13800     * <p>Notes:
13801     * <ol>
13802     *
13803     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
13804     *     convenient way between the two arguments.  For example,
13805     *     JD(TT)=2450123.7 could be expressed in any of these ways,
13806     *     among others:
13807     *<pre>
13808     *            date1          date2
13809     *
13810     *         2450123.7           0.0       (JD method)
13811     *         2451545.0       -1421.3       (J2000 method)
13812     *         2400000.5       50123.2       (MJD method)
13813     *         2450123.5           0.2       (date &amp; time method)
13814     *</pre>
13815     *     The JD method is the most natural and convenient to use in
13816     *     cases where the loss of several decimal digits of resolution
13817     *     is acceptable.  The J2000 method is best matched to the way
13818     *     the argument is handled internally and will deliver the
13819     *     optimum resolution.  The MJD method and the date &amp; time methods
13820     *     are both good compromises between resolution and convenience.
13821     *
13822     * <li> The matrix operates in the sense V(true) = rmatn * V(mean),
13823     *     where the p-vector V(true) is with respect to the true
13824     *     equatorial triad of date and the p-vector V(mean) is with
13825     *     respect to the mean equatorial triad of date.
13826     *</ol>
13827     *<p>Called:<ul>
13828     *     <li>{@link #jauNut80} nutation, IAU 1980
13829     *     <li>{@link #jauObl80} mean obliquity, IAU 1980
13830     *     <li>{@link #jauNumat} form nutation matrix
13831     * </ul>
13832     *@version 2008 May 12
13833     *
13834     *  @since Release 20101201
13835     *
13836     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
13837     */
13838     public static double[][] jauNutm80(double date1, double date2)
13839     {
13840         double rmatn[][];
13841     /* Nutation components and mean obliquity. */
13842        NutationTerms nt = jauNut80(date1, date2);
13843        double epsa = jauObl80(date1, date2);
13844 
13845     /* Build the rotation matrix. */
13846        rmatn = jauNumat(epsa, nt.dpsi, nt.deps);
13847 
13848        return rmatn;
13849 
13850         }
13851     
13852 
13853     /**
13854     *  Mean obliquity of the ecliptic, IAU 2006 precession model.
13855     *
13856     *<p>This function is derived from the International Astronomical Union's
13857     *  SOFA (Standards Of Fundamental Astronomy) software collection.
13858     *
13859     *<p>Status:  canonical model.
13860     *
13861     *<!-- Given: -->
13862     *     @param date1 double TT as a 2-part Julian Date (Note 1)
13863     *     @param date2 double TT as a 2-part Julian Date (Note 1)
13864     *
13865     * <!-- Returned (function value): -->
13866     *  @return double   obliquity of the ecliptic (radians, Note 2)
13867     *
13868     * <p>Notes:
13869     * <ol>
13870     *
13871     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
13872     *     convenient way between the two arguments.  For example,
13873     *     JD(TT)=2450123.7 could be expressed in any of these ways,
13874     *     among others:
13875     *<pre>
13876     *            date1          date2
13877     *
13878     *         2450123.7           0.0       (JD method)
13879     *         2451545.0       -1421.3       (J2000 method)
13880     *         2400000.5       50123.2       (MJD method)
13881     *         2450123.5           0.2       (date &amp; time method)
13882     *</pre>
13883     *     The JD method is the most natural and convenient to use in
13884     *     cases where the loss of several decimal digits of resolution
13885     *     is acceptable.  The J2000 method is best matched to the way
13886     *     the argument is handled internally and will deliver the
13887     *     optimum resolution.  The MJD method and the date &amp; time methods
13888     *     are both good compromises between resolution and convenience.
13889     *
13890     * <li> The result is the angle between the ecliptic and mean equator of
13891     *     date date1+date2.
13892     *</ol>
13893     *<p>Reference:
13894     *
13895     *     Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351
13896     *
13897     *@version 2009 March 16
13898     *
13899     *  @since Release 20101201
13900     *
13901     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
13902     */
13903     public static double jauObl06(double date1, double date2)
13904     {
13905        double t, eps0;
13906 
13907 
13908     /* Interval between fundamental date J2000.0 and given date (JC). */
13909        t = ((date1 - DJ00) + date2) / DJC;
13910 
13911     /* Mean obliquity. */
13912        eps0 = (84381.406     +
13913               (-46.836769    +
13914               ( -0.0001831   +
13915               (  0.00200340  +
13916               ( -0.000000576 +
13917               ( -0.0000000434) * t) * t) * t) * t) * t) * DAS2R;
13918 
13919        return eps0;
13920 
13921         }
13922     
13923 
13924     /**
13925     *  Mean obliquity of the ecliptic, IAU 1980 model.
13926     *
13927     *<p>This function is derived from the International Astronomical Union's
13928     *  SOFA (Standards Of Fundamental Astronomy) software collection.
13929     *
13930     *<p>Status:  canonical model.
13931     *
13932     *<!-- Given: -->
13933     *     @param date1 double TT as a 2-part Julian Date (Note 1)
13934     *     @param date2 double TT as a 2-part Julian Date (Note 1)
13935     *
13936     * <!-- Returned (function value): -->
13937     *  @return double    obliquity of the ecliptic (radians, Note 2)
13938     *
13939     * <p>Notes:
13940     * <ol>
13941     *
13942     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
13943     *     convenient way between the two arguments.  For example,
13944     *     JD(TT)=2450123.7 could be expressed in any of these ways,
13945     *     among others:
13946     *<pre>
13947     *            date1          date2
13948     *
13949     *         2450123.7           0.0       (JD method)
13950     *         2451545.0       -1421.3       (J2000 method)
13951     *         2400000.5       50123.2       (MJD method)
13952     *         2450123.5           0.2       (date &amp; time method)
13953     *</pre>
13954     *     The JD method is the most natural and convenient to use in
13955     *     cases where the loss of several decimal digits of resolution
13956     *     is acceptable.  The J2000 method is best matched to the way
13957     *     the argument is handled internally and will deliver the
13958     *     optimum resolution.  The MJD method and the date &amp; time methods
13959     *     are both good compromises between resolution and convenience.
13960     *
13961     * <li> The result is the angle between the ecliptic and mean equator of
13962     *     date date1+date2.
13963     *</ol>
13964     *<p>Reference:
13965     *
13966     *     <p>Explanatory Supplement to the Astronomical Almanac,
13967     *     P. Kenneth Seidelmann (ed), University Science Books (1992),
13968     *     Expression 3.222-1 (p114).
13969     *
13970     *@version 2009 March 16
13971     *
13972     *  @since Release 20101201
13973     *
13974     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
13975     */
13976     public static double jauObl80(double date1, double date2)
13977     {
13978        double t, eps0;
13979 
13980 
13981     /* Interval between fundamental epoch J2000.0 and given date (JC). */
13982        t = ((date1 - DJ00) + date2) / DJC;
13983 
13984     /* Mean obliquity of date. */
13985        eps0 = DAS2R * (84381.448  +
13986                       (-46.8150   +
13987                       (-0.00059   +
13988                       ( 0.001813) * t) * t) * t);
13989 
13990        return eps0;
13991 
13992         }
13993     
13994     
13995     /**
13996      * equinox based precession angles.
13997      *  .
13998      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 21 Nov 2011
13999      * @version $Revision$ $date$
14000      */
14001     public static class PrecessionAngles {
14002         /** epsilon_0   obliquity at J2000.0. */
14003         public double eps0; 
14004         /** psi_A       luni-solar precession. */
14005         public double psia;
14006         /** omega_A     inclination of equator wrt J2000.0 ecliptic. */
14007         public  double oma;
14008         /** P_A         ecliptic pole x, J2000.0 ecliptic triad. */
14009         public  double bpa;
14010         /** Q_A         ecliptic pole -y, J2000.0 ecliptic triad. */
14011         public double bqa;
14012         /** pi_A        angle between moving and J2000.0 ecliptics. */
14013         public  double pia;
14014         /** Pi_A        longitude of ascending node of the ecliptic. */
14015         public  double bpia;
14016         /** epsilon_A   obliquity of the ecliptic. */
14017         public double epsa;
14018         /** chi_A       planetary precession. */
14019         public  double chia;
14020         /** z_A         equatorial precession: -3rd 323 Euler angle. */
14021         public  double za;
14022         /** zeta_A      equatorial precession: -1st 323 Euler angle. */
14023         public  double zetaa;
14024         /** theta_A     equatorial precession: 2nd 323 Euler angle. */
14025         public double thetaa;
14026         /** p_A         general precession. */
14027         public  double pa;
14028         /** gamma_J2000 J2000.0 RA difference of ecliptic poles. */
14029         public  double gam;
14030         /** phi_J2000   J2000.0 codeclination of ecliptic pole. */
14031         public  double phi;
14032         /** psi_J2000   longitude difference of equator poles, J2000.0. */
14033         public  double psi;
14034 
14035         public PrecessionAngles ( double eps0, double psia, double oma, double bpa,
14036                  double bqa, double pia, double bpia,
14037                  double epsa, double chia, double za, double zetaa,
14038                  double thetaa, double pa,
14039                  double gam, double phi, double psi){
14040             
14041             this.eps0 = eps0;
14042             this.psia = psia;
14043             this.oma = oma;
14044             this.bpa = bpa;
14045             this.bqa = bqa;
14046             this.pia = pia;
14047             this.bpia = bpia;
14048             this.epsa = epsa;
14049             this.chia = chia;
14050             this.za = za;
14051             this.zetaa = zetaa;
14052             this.thetaa = thetaa;
14053             this.pa = pa;
14054             this.gam = gam;
14055             this.phi = phi;
14056             this.psi = psi;
14057         }
14058     }
14059     /**
14060     *  Precession angles, IAU 2006, equinox based.
14061     *
14062     *<p>This function is derived from the International Astronomical Union's
14063     *  SOFA (Standards Of Fundamental Astronomy) software collection.
14064     *
14065     *<p>Status:  canonical models.
14066     *
14067     *<!-- Given: -->
14068     *     @param date1 double TT as a 2-part Julian Date (Note 1)
14069     *     @param date2 double TT as a 2-part Julian Date (Note 1)
14070     *
14071     *  Returned (see Note 2):
14072     *     eps0          double   epsilon_0
14073     *     psia          double   psi_A
14074     *     oma           double   omega_A
14075     *     bpa           double   P_A
14076     *     bqa           double   Q_A
14077     *     pia           double   pi_A
14078     *     bpia          double   Pi_A
14079     *     epsa          double   obliquity epsilon_A
14080     *     chia          double   chi_A
14081     *     za            double   z_A
14082     *     zetaa         double   zeta_A
14083     *     thetaa        double   theta_A
14084     *     pa            double   p_A
14085     *     gam           double   F-W angle gamma_J2000
14086     *     phi           double   F-W angle phi_J2000
14087     *     psi           double   F-W angle psi_J2000
14088     *
14089     * <p>Notes:
14090     * <ol>
14091     *
14092     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
14093     *     convenient way between the two arguments.  For example,
14094     *     JD(TT)=2450123.7 could be expressed in any of these ways,
14095     *     among others:
14096     *<pre>
14097     *            date1          date2
14098     *
14099     *         2450123.7           0.0       (JD method)
14100     *         2451545.0       -1421.3       (J2000 method)
14101     *         2400000.5       50123.2       (MJD method)
14102     *         2450123.5           0.2       (date &amp; time method)
14103     *</pre>
14104     *     The JD method is the most natural and convenient to use in
14105     *     cases where the loss of several decimal digits of resolution
14106     *     is acceptable.  The J2000 method is best matched to the way
14107     *     the argument is handled internally and will deliver the
14108     *     optimum resolution.  The MJD method and the date &amp; time methods
14109     *     are both good compromises between resolution and convenience.
14110     *
14111     * <li> This function returns the set of equinox based angles for the
14112     *     Capitaine et al. "P03" precession theory, adopted by the IAU in
14113     *     2006.  The angles are set out in Table 1 of Hilton et al. (2006):
14114     *
14115     *     eps0   epsilon_0   obliquity at J2000.0
14116     *     psia   psi_A       luni-solar precession
14117     *     oma    omega_A     inclination of equator wrt J2000.0 ecliptic
14118     *     bpa    P_A         ecliptic pole x, J2000.0 ecliptic triad
14119     *     bqa    Q_A         ecliptic pole -y, J2000.0 ecliptic triad
14120     *     pia    pi_A        angle between moving and J2000.0 ecliptics
14121     *     bpia   Pi_A        longitude of ascending node of the ecliptic
14122     *     epsa   epsilon_A   obliquity of the ecliptic
14123     *     chia   chi_A       planetary precession
14124     *     za     z_A         equatorial precession: -3rd 323 Euler angle
14125     *     zetaa  zeta_A      equatorial precession: -1st 323 Euler angle
14126     *     thetaa theta_A     equatorial precession: 2nd 323 Euler angle
14127     *     pa     p_A         general precession
14128     *     gam    gamma_J2000 J2000.0 RA difference of ecliptic poles
14129     *     phi    phi_J2000   J2000.0 codeclination of ecliptic pole
14130     *     psi    psi_J2000   longitude difference of equator poles, J2000.0
14131     *
14132     *     The returned values are all radians.
14133     *
14134     * <li> Hilton et al. (2006) Table 1 also contains angles that depend on
14135     *     models distinct from the P03 precession theory itself, namely the
14136     *     IAU 2000A frame bias and nutation.  The quoted polynomials are
14137     *     used in other JSOFA functions:
14138     *
14139     *     . jauXy06  contains the polynomial parts of the X and Y series.
14140     *
14141     *     . jauS06  contains the polynomial part of the s+XY/2 series.
14142     *
14143     *     . jauPfw06  implements the series for the Fukushima-Williams
14144     *       angles that are with respect to the GCRS pole (i.e. the variants
14145     *       that include frame bias).
14146     *
14147     * <li> The IAU resolution stipulated that the choice of parameterization
14148     *     was left to the user, and so an IAU compliant precession
14149     *     implementation can be constructed using various combinations of
14150     *     the angles returned by the present function.
14151     *
14152     * <li> The parameterization used by JSOFA is the Fukushima-Williams angles
14153     *     referred directly to the GCRS pole.  These are the final four
14154     *     arguments returned by the present function, but are more
14155     *     efficiently calculated by calling the function jauPfw06.   JSOFA
14156     *     also supports the direct computation of the CIP GCRS X,Y by
14157     *     series, available by calling jauXy06.
14158     *
14159     * <li> The agreement between the different parameterizations is at the
14160     *     1 microarcsecond level in the present era.
14161     *
14162     * <li> When constructing a precession formulation that refers to the GCRS
14163     *     pole rather than the dynamical pole, it may (depending on the
14164     *     choice of angles) be necessary to introduce the frame bias
14165     *     explicitly.
14166     *
14167     * <li> It is permissible to re-use the same variable in the returned
14168     *     arguments.  The quantities are stored in the stated order.
14169     *</ol>
14170     *<p>Reference:
14171     *
14172     *     Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351
14173     *
14174     *<p>Called:<ul>
14175     *     <li>{@link #jauObl06} mean obliquity, IAU 2006
14176     * </ul>
14177     *@version 2009 December 17
14178     *
14179     *  @since Release 20101201
14180     *
14181     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
14182     */
14183     public static PrecessionAngles jauP06e(double date1, double date2)
14184     {
14185        double t;
14186        double eps0,  psia,  oma,  bpa,
14187         bqa,  pia,  bpia,
14188         epsa,  chia,  za,  zetaa,
14189         thetaa,  pa,
14190         gam,  phi,  psi;
14191 
14192     /* Interval between fundamental date J2000.0 and given date (JC). */
14193        t = ((date1 - DJ00) + date2) / DJC;
14194 
14195     /* Obliquity at J2000.0. */
14196 
14197        eps0 = 84381.406 * DAS2R;
14198 
14199     /* Luni-solar precession. */
14200 
14201        psia = ( 5038.481507     +
14202                (   -1.0790069    +
14203                (   -0.00114045   +
14204                (    0.000132851  +
14205                (   -0.0000000951 )
14206                * t) * t) * t) * t) * t * DAS2R;
14207 
14208     /* Inclination of mean equator with respect to the J2000.0 ecliptic. */
14209 
14210        oma = eps0 + ( -0.025754     +
14211                       (  0.0512623    +
14212                       ( -0.00772503   +
14213                       ( -0.000000467  +
14214                       (  0.0000003337 )
14215                       * t) * t) * t) * t) * t * DAS2R;
14216 
14217     /* Ecliptic pole x, J2000.0 ecliptic triad. */
14218 
14219        bpa = (  4.199094     +
14220               (  0.1939873    +
14221               ( -0.00022466   +
14222               ( -0.000000912  +
14223               (  0.0000000120 )
14224               * t) * t) * t) * t) * t * DAS2R;
14225 
14226     /* Ecliptic pole -y, J2000.0 ecliptic triad. */
14227 
14228        bqa = ( -46.811015     +
14229               (   0.0510283    +
14230               (   0.00052413   +
14231               (  -0.000000646  +
14232               (  -0.0000000172 )
14233               * t) * t) * t) * t) * t * DAS2R;
14234 
14235     /* Angle between moving and J2000.0 ecliptics. */
14236 
14237        pia = ( 46.998973     +
14238               ( -0.0334926    +
14239               ( -0.00012559   +
14240               (  0.000000113  +
14241               ( -0.0000000022 )
14242               * t) * t) * t) * t) * t * DAS2R;
14243 
14244     /* Longitude of ascending node of the moving ecliptic. */
14245 
14246        bpia = ( 629546.7936      +
14247                (   -867.95758     +
14248                (      0.157992    +
14249                (     -0.0005371   +
14250                (     -0.00004797  +
14251                (      0.000000072 )
14252                * t) * t) * t) * t) * t) * DAS2R;
14253 
14254     /* Mean obliquity of the ecliptic. */
14255 
14256        epsa = jauObl06(date1, date2);
14257 
14258     /* Planetary precession. */
14259 
14260        chia = ( 10.556403     +
14261                ( -2.3814292    +
14262                ( -0.00121197   +
14263                (  0.000170663  +
14264                ( -0.0000000560 )
14265                * t) * t) * t) * t) * t * DAS2R;
14266 
14267     /* Equatorial precession: minus the third of the 323 Euler angles. */
14268 
14269        za = (   -2.650545     +
14270              ( 2306.077181     +
14271              (    1.0927348    +
14272              (    0.01826837   +
14273              (   -0.000028596  +
14274              (   -0.0000002904 )
14275              * t) * t) * t) * t) * t) * DAS2R;
14276 
14277     /* Equatorial precession: minus the first of the 323 Euler angles. */
14278 
14279        zetaa = (    2.650545     +
14280                 ( 2306.083227     +
14281                 (    0.2988499    +
14282                 (    0.01801828   +
14283                 (   -0.000005971  +
14284                 (   -0.0000003173 )
14285                 * t) * t) * t) * t) * t) * DAS2R;
14286 
14287     /* Equatorial precession: second of the 323 Euler angles. */
14288 
14289        thetaa = ( 2004.191903     +
14290                  (   -0.4294934    +
14291                  (   -0.04182264   +
14292                  (   -0.000007089  +
14293                  (   -0.0000001274 )
14294                  * t) * t) * t) * t) * t * DAS2R;
14295 
14296     /* General precession. */
14297 
14298        pa = ( 5028.796195     +
14299              (    1.1054348    +
14300              (    0.00007964   +
14301              (   -0.000023857  +
14302              (    0.0000000383 )
14303              * t) * t) * t) * t) * t * DAS2R;
14304 
14305     /* Fukushima-Williams angles for precession. */
14306 
14307        gam = ( 10.556403     +
14308               (  0.4932044    +
14309               ( -0.00031238   +
14310               ( -0.000002788  +
14311               (  0.0000000260 )
14312               * t) * t) * t) * t) * t * DAS2R;
14313 
14314        phi = eps0 + ( -46.811015     +
14315                       (   0.0511269    +
14316                       (   0.00053289   +
14317                       (  -0.000000440  +
14318                       (  -0.0000000176 )
14319                       * t) * t) * t) * t) * t * DAS2R;
14320 
14321        psi = ( 5038.481507     +
14322               (    1.5584176    +
14323               (   -0.00018522   +
14324               (   -0.000026452  +
14325               (   -0.0000000148 )
14326               * t) * t) * t) * t) * t * DAS2R;
14327 
14328        return new PrecessionAngles(eps0, psia, oma, bpa, bqa, pia, bpia, epsa, chia, za, zetaa, thetaa, pa, gam, phi, psi);
14329 
14330         }
14331     
14332 
14333     /**
14334     *  Extend a p-vector to a pv-vector by appending a zero velocity.
14335     *
14336     *<p>This function is derived from the International Astronomical Union's
14337     *  SOFA (Standards Of Fundamental Astronomy) software collection.
14338     *
14339     *<p>Status:  vector/matrix support function.
14340     *
14341     *<!-- Given: -->
14342     *     @param p         double[3]        p-vector
14343     *
14344     *<!-- Returned: -->
14345     *     @return pv        double[2][3]      <u>returned</u> pv-vector
14346     *
14347     *<p>Called:<ul>
14348     *     <li>{@link #jauCp} copy p-vector
14349     *     <li>{@link #jauZp} zero p-vector
14350     * </ul>
14351     *@version 2008 May 11
14352     *
14353     *  @since Release 20101201
14354     *
14355     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
14356     */
14357     public static double[][] jauP2pv(double p[] )
14358     {
14359         double pv[][] = new double[3][3];
14360         jauCp(p, pv[0]);
14361         jauZp(pv[1]);
14362 
14363         return pv;
14364 
14365         }
14366     
14367     /**
14368      * A position expressed in spherical polar coordinates.
14369      *  .
14370      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 21 Nov 2011
14371      * @version $Revision$ $date$
14372      */
14373     public static class SphericalPosition {
14374         /** longitude angle (radians) */
14375         public double theta;
14376         /** latitude angle (radians) */
14377         public double phi;
14378         /** radial distance */
14379         public double r;
14380         public SphericalPosition(double theta, double phi, double r) {
14381            this.theta = theta;
14382            this.phi = phi;
14383            this.r = r;
14384         }
14385     }
14386     
14387     /**
14388     *  P-vector to spherical polar coordinates.
14389     *
14390     *<p>This function is derived from the International Astronomical Union's
14391     *  SOFA (Standards Of Fundamental Astronomy) software collection.
14392     *
14393     *<p>Status:  vector/matrix support function.
14394     *
14395     *<!-- Given: -->
14396     *     @param p         double[3]     p-vector
14397     *
14398     *<!-- Returned: -->
14399     *     @return theta     double         <u>returned</u> longitude angle (radians)
14400     *             phi       double         <u>returned</u> latitude angle (radians)
14401     *             r         double         <u>returned</u> radial distance
14402     *
14403     * <p>Notes:
14404     * <ol>
14405     *
14406     * <li> If P is null, zero theta, phi and r are returned.
14407     *
14408     * <li> At either pole, zero theta is returned.
14409     *</ol>
14410     *<p>Called:<ul>
14411     *     <li>{@link #jauC2s} p-vector to spherical
14412     *     <li>{@link #jauPm} modulus of p-vector
14413     * </ul>
14414     *@version 2008 May 22
14415     *
14416     *  @since Release 20101201
14417     *
14418     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
14419     */
14420     public static SphericalPosition jauP2s(double p[])
14421     {
14422        SphericalCoordinate sc = jauC2s(p);
14423        double r = jauPm(p);
14424 
14425        return new SphericalPosition(sc.alpha, sc.delta, r);
14426 
14427         }
14428     
14429 
14430     /**
14431     *  Position-angle from two p-vectors.
14432     *
14433     *<p>This function is derived from the International Astronomical Union's
14434     *  SOFA (Standards Of Fundamental Astronomy) software collection.
14435     *
14436     *<p>Status:  vector/matrix support function.
14437     *
14438     *<!-- Given: -->
14439     *     @param a       double[3]   direction of reference point
14440     *     @param b       double[3]   direction of point whose PA is required
14441     *
14442     * <!-- Returned (function value): -->
14443     *  @return double     position angle of b with respect to a (radians)
14444     *
14445     * <p>Notes:
14446     * <ol>
14447     *
14448     * <li> The result is the position angle, in radians, of direction b with
14449     *     respect to direction a.  It is in the range -pi to +pi.  The
14450     *     sense is such that if b is a small distance "north" of a the
14451     *     position angle is approximately zero, and if b is a small
14452     *     distance "east" of a the position angle is approximately +pi/2.
14453     *
14454     * <li> The vectors a and b need not be of unit length.
14455     *
14456     * <li> Zero is returned if the two directions are the same or if either
14457     *     vector is null.
14458     *
14459     * <li> If vector a is at a pole, the result is ill-defined.
14460     *</ol>
14461     *<p>Called:<ul>
14462     *     <li>{@link #jauPn} decompose p-vector into modulus and direction
14463     *     <li>{@link #jauPm} modulus of p-vector
14464     *     <li>{@link #jauPxp} vector product of two p-vectors
14465     *     <li>{@link #jauPmp} p-vector minus p-vector
14466     *     <li>{@link #jauPdp} scalar product of two p-vectors
14467     * </ul>
14468     *@version 2008 May 25
14469     *
14470     *  @since Release 20101201
14471     *
14472     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
14473     */
14474     public static double jauPap(double a[] , double b[] )
14475     {
14476        double am, au[] = new double[3], bm, st, ct, xa, ya, za, eta[] = new double[3], xi[] = new double[3], a2b[] = new double[3], pa;
14477 
14478 
14479     /* Modulus and direction of the a vector. */
14480        NormalizedVector nv = jauPn(a );
14481        am = nv.r; au = nv.u;
14482     /* Modulus of the b vector. */
14483        bm = jauPm(b);
14484 
14485     /* Deal with the case of a null vector. */
14486        if ((am == 0.0) || (bm == 0.0)) {
14487           st = 0.0;
14488           ct = 1.0;
14489        } else {
14490 
14491        /* The "north" axis tangential from a (arbitrary length). */
14492           xa = a[0];
14493           ya = a[1];
14494           za = a[2];
14495           eta[0] = -xa * za;
14496           eta[1] = -ya * za;
14497           eta[2] =  xa*xa + ya*ya;
14498 
14499        /* The "east" axis tangential from a (same length). */
14500           xi = jauPxp(eta,au);
14501 
14502        /* The vector from a to b. */
14503           a2b = jauPmp(b, a);
14504 
14505        /* Resolve into components along the north and east axes. */
14506           st = jauPdp(a2b, xi);
14507           ct = jauPdp(a2b, eta);
14508 
14509        /* Deal with degenerate cases. */
14510           if ((st == 0.0) && (ct == 0.0)) ct = 1.0;
14511        }
14512 
14513     /* Position angle. */
14514        pa = atan2(st, ct);
14515 
14516        return pa;
14517 
14518         }
14519     
14520 
14521     /**
14522     *  Position-angle from spherical coordinates.
14523     *
14524     *<p>This function is derived from the International Astronomical Union's
14525     *  SOFA (Standards Of Fundamental Astronomy) software collection.
14526     *
14527     *<p>Status:  vector/matrix support function.
14528     *
14529     *<!-- Given: -->
14530     *     @param al      double      longitude of point A (e.g. RA) in radians
14531     *     @param ap      double      latitude of point A (e.g. Dec) in radians
14532     *     @param bl      double      longitude of point B
14533     *     @param bp      double      latitude of point B
14534     *
14535     * <!-- Returned (function value): -->
14536     *  @return double     position angle of B with respect to A
14537     *
14538     * <p>Notes:
14539     * <ol>
14540     *
14541     * <li> The result is the bearing (position angle), in radians, of point
14542     *     B with respect to point A.  It is in the range -pi to +pi.  The
14543     *     sense is such that if B is a small distance "east" of point A,
14544     *     the bearing is approximately +pi/2.
14545     *
14546     * <li> Zero is returned if the two points are coincident.
14547     *</ol>
14548     *@version 2008 May 22
14549     *
14550     *  @since Release 20101201
14551     *
14552     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
14553     */
14554     public static double jauPas(double al, double ap, double bl, double bp)
14555     {
14556        double dl, x, y, pa;
14557 
14558 
14559        dl = bl - al;
14560        y = sin(dl) * cos(bp);
14561        x = sin(bp) * cos(ap) - cos(bp) * sin(ap) * cos(dl);
14562        pa = ((x != 0.0) || (y != 0.0)) ? atan2(y, x) : 0.0;
14563 
14564        return pa;
14565 
14566         }
14567     
14568 
14569     /**
14570     *  This function forms three Euler angles which implement general
14571     *  precession from epoch J2000.0, using the IAU 2006 model.  Frame
14572     *  bias (the offset between ICRS and mean J2000.0) is included.
14573     *
14574     *<p>This function is derived from the International Astronomical Union's
14575     *  SOFA (Standards Of Fundamental Astronomy) software collection.
14576     *
14577     *<p>Status:  support function.
14578     *
14579     *<!-- Given: -->
14580     *     @param date1 double TT as a 2-part Julian Date (Note 1)
14581     *     @param date2 double TT as a 2-part Julian Date (Note 1)
14582     *
14583     *<!-- Returned: -->
14584     *     @return bzeta          1st rotation: radians cw around z,
14585     *                            3rd rotation: radians cw around z,
14586     *                            2nd rotation: radians ccw around y.
14587     *
14588     * <p>Notes:
14589     * <ol>
14590     *
14591     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
14592     *     convenient way between the two arguments.  For example,
14593     *     JD(TT)=2450123.7 could be expressed in any of these ways,
14594     *     among others:
14595     *<pre>
14596     *            date1          date2
14597     *
14598     *         2450123.7           0.0       (JD method)
14599     *         2451545.0       -1421.3       (J2000 method)
14600     *         2400000.5       50123.2       (MJD method)
14601     *         2450123.5           0.2       (date &amp; time method)
14602     *</pre>
14603     *     The JD method is the most natural and convenient to use in
14604     *     cases where the loss of several decimal digits of resolution
14605     *     is acceptable.  The J2000 method is best matched to the way
14606     *     the argument is handled internally and will deliver the
14607     *     optimum resolution.  The MJD method and the date &amp; time methods
14608     *     are both good compromises between resolution and convenience.
14609     *
14610     * <li> The traditional accumulated precession angles zeta_A, z_A,
14611     *     theta_A cannot be obtained in the usual way, namely through
14612     *     polynomial expressions, because of the frame bias.  The latter
14613     *     means that two of the angles undergo rapid changes near this
14614     *     date.  They are instead the results of decomposing the
14615     *     precession-bias matrix obtained by using the Fukushima-Williams
14616     *     method, which does not suffer from the problem.  The
14617     *     decomposition returns values which can be used in the
14618     *     conventional formulation and which include frame bias.
14619     *
14620     * <li> The three angles are returned in the conventional order, which
14621     *     is not the same as the order of the corresponding Euler
14622     *     rotations.  The precession-bias matrix is
14623     *     R_3(-z) x R_2(+theta) x R_3(-zeta).
14624     *
14625     * <li> Should zeta_A, z_A, theta_A angles be required that do not
14626     *     contain frame bias, they are available by calling the JSOFA
14627     *     function jauP06e.
14628     *</ol>
14629     *<p>Called:<ul>
14630     *     <li>{@link #jauPmat06} PB matrix, IAU 2006
14631     *     <li>{@link #jauRz} rotate around Z-axis
14632     * </ul>
14633     *@version 2008 May 26
14634     *
14635     *  @since Release 20101201
14636     *
14637     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
14638     */
14639     public static EulerAngles jauPb06(double date1, double date2)
14640     {
14641        double r[][] = new double[3][3], r31, r32;
14642 
14643 
14644     /* Precession matrix via Fukushima-Williams angles. */
14645        r = jauPmat06(date1, date2);
14646 
14647     /* Solve for z. */
14648        double bz = atan2(r[1][2], r[0][2]);
14649 
14650     /* Remove it from the matrix. */
14651        jauRz(bz, r);
14652 
14653     /* Solve for the remaining two angles. */
14654        double bzeta = atan2 (r[1][0], r[1][1]);
14655        r31 = r[2][0];
14656        r32 = r[2][1];
14657        double btheta = atan2(-dsign(sqrt(r31 * r31 + r32 * r32), r[0][2]),
14658                        r[2][2]);
14659 
14660        return new EulerAngles(bzeta, bz, btheta);
14661 
14662         }
14663     
14664 
14665     /**
14666     *  p-vector inner (=scalar=dot) product.
14667     *
14668     *<p>This function is derived from the International Astronomical Union's
14669     *  SOFA (Standards Of Fundamental Astronomy) software collection.
14670     *
14671     *<p>Status:  vector/matrix support function.
14672     *
14673     *<!-- Given: -->
14674     *     @param a       double[3]      first p-vector
14675     *     @param b       double[3]      second p-vector
14676     *
14677     * <!-- Returned (function value): -->
14678     *  @return double        a . b
14679     *
14680     *@version 2008 May 22
14681     *
14682     *  @since Release 20101201
14683     *
14684     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
14685     */
14686     public static double jauPdp(double a[] , double b[] )
14687     {
14688        double w;
14689 
14690 
14691        w  = a[0] * b[0]
14692           + a[1] * b[1]
14693           + a[2] * b[2];
14694 
14695        return w;
14696 
14697         }
14698     
14699 
14700     /**
14701      * Precession angles, IAU 2006 (Fukushima-Williams 4-angle formulation).
14702      * 
14703      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 1 Feb 2010
14704      * 
14705      * @since AIDA Stage 1
14706      */
14707     public static class FWPrecessionAngles{
14708         /** F-W angle gamma_bar (radians) */
14709         public double gamb;
14710         /** F-W angle phi_bar (radians) */
14711         public double phib;
14712         /** F-W angle psi_bar (radians) */
14713         public double psib;
14714         /** F-W angle epsilon_A (radians) */
14715         public double epsa;
14716         public FWPrecessionAngles(double gamb, double phib, double psib, double epsa) {
14717             this.gamb = gamb;
14718             this.phib = phib;
14719             this.psib = psib;
14720             this.epsa = epsa;
14721         }
14722     }
14723     /**
14724     *  Precession angles, IAU 2006 (Fukushima-Williams 4-angle formulation).
14725     *
14726     *<p>This function is derived from the International Astronomical Union's
14727     *  SOFA (Standards Of Fundamental Astronomy) software collection.
14728     *
14729     *<p>Status:  canonical model.
14730     *
14731     *<!-- Given: -->
14732     *     @param date1 double TT as a 2-part Julian Date (Note 1)
14733     *     @param date2 double TT as a 2-part Julian Date (Note 1)
14734     *
14735     *<!-- Returned: -->
14736     *     @return gamb          double     <u>returned</u> F-W angle gamma_bar (radians)
14737     *             phib          double     <u>returned</u> F-W angle phi_bar (radians)
14738     *             psib          double     <u>returned</u> F-W angle psi_bar (radians)
14739     *             epsa          double     <u>returned</u> F-W angle epsilon_A (radians)
14740     *
14741     * <p>Notes:
14742     * <ol>
14743     *
14744     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
14745     *     convenient way between the two arguments.  For example,
14746     *     JD(TT)=2450123.7 could be expressed in any of these ways,
14747     *     among others:
14748     *<pre>
14749     *            date1          date2
14750     *
14751     *         2450123.7           0.0       (JD method)
14752     *         2451545.0       -1421.3       (J2000 method)
14753     *         2400000.5       50123.2       (MJD method)
14754     *         2450123.5           0.2       (date &amp; time method)
14755     *</pre>
14756     *     The JD method is the most natural and convenient to use in
14757     *     cases where the loss of several decimal digits of resolution
14758     *     is acceptable.  The J2000 method is best matched to the way
14759     *     the argument is handled internally and will deliver the
14760     *     optimum resolution.  The MJD method and the date &amp; time methods
14761     *     are both good compromises between resolution and convenience.
14762     *
14763     * <li> Naming the following points:
14764     *
14765     *           e = J2000.0 ecliptic pole,
14766     *           p = GCRS pole,
14767     *           E = mean ecliptic pole of date,
14768     *     and   P = mean pole of date,
14769     *
14770     *     the four Fukushima-Williams angles are as follows:
14771     *
14772     *        gamb = gamma_bar = epE
14773     *        phib = phi_bar = pE
14774     *        psib = psi_bar = pEP
14775     *        epsa = epsilon_A = EP
14776     *
14777     * <li> The matrix representing the combined effects of frame bias and
14778     *     precession is:
14779     *
14780     *        PxB = R_1(-epsa).R_3(-psib).R_1(phib).R_3(gamb)
14781     *
14782     * <li> The matrix representing the combined effects of frame bias,
14783     *     precession and nutation is simply:
14784     *
14785     *        NxPxB = R_1(-epsa-dE).R_3(-psib-dP).R_1(phib).R_3(gamb)
14786     *
14787     *     where dP and dE are the nutation components with respect to the
14788     *     ecliptic of date.
14789     *</ol>
14790     *<p>Reference:
14791     *
14792     *     Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351
14793     *
14794     *<p>Called:<ul>
14795     *     <li>{@link #jauObl06} mean obliquity, IAU 2006
14796     * </ul>
14797     *@version 2009 December 17
14798     *
14799     *  @since Release 20101201
14800     *
14801     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
14802     */
14803     public static FWPrecessionAngles jauPfw06(double date1, double date2 )
14804     {
14805        double t;
14806 
14807 
14808     /* Interval between fundamental date J2000.0 and given date (JC). */
14809        t = ((date1 - DJ00) + date2) / DJC;
14810 
14811     /* P03 bias+precession angles. */
14812        double gamb = (    -0.052928     +
14813                (    10.556378     +
14814                (     0.4932044    +
14815                (    -0.00031238   +
14816                (    -0.000002788  +
14817                (     0.0000000260 )
14818                * t) * t) * t) * t) * t) * DAS2R;
14819        double phib = ( 84381.412819     +
14820                (   -46.811016     +
14821                (     0.0511268    +
14822                (     0.00053289   +
14823                (    -0.000000440  +
14824                (    -0.0000000176 )
14825                * t) * t) * t) * t) * t) * DAS2R;
14826        double psib = (    -0.041775     +
14827                (  5038.481484     +
14828                (     1.5584175    +
14829                (    -0.00018522   +
14830                (    -0.000026452  +
14831                (    -0.0000000148 )
14832                * t) * t) * t) * t) * t) * DAS2R;
14833        double epsa =  jauObl06(date1, date2);
14834 
14835        return new FWPrecessionAngles(gamb, phib, psib, epsa);
14836 
14837         }
14838     
14839 
14840     /**
14841     *<p>This function is derived from the International Astronomical Union's
14842     *  SOFA (Standards Of Fundamental Astronomy) software collection.
14843     *
14844     *<p>Status:  support function.
14845     *
14846     *  Approximate heliocentric position and velocity of a nominated major
14847     *  planet:  Mercury, Venus, EMB, Mars, Jupiter, Saturn, Uranus or
14848     *  Neptune (but not the Earth itself).
14849     *
14850     *<!-- Given: -->
14851     *     @param date1   double        TDB date part A (Note 1)
14852     *     @param date2   double        TDB date part B (Note 1)
14853     *     @param np      int           planet (1=Mercury, 2=Venus, 3=EMB, 4=Mars,
14854     *                                  5=Jupiter,  6=Saturn,  7=Uranus, 8=Neptune)
14855     *
14856     *  Returned (argument):
14857     *     @param  pv     double[3][2] (returned) planet p,v (heliocentric, J2000.0, AU,AU/d)
14858     *
14859     * <!-- Returned (function value): -->
14860     *  @return int          status: -1 = illegal NP (outside 1-8)
14861     *                                  0 = OK
14862     *                                 +1 = warning: year outside 1000-3000
14863     *                                 +2 = warning: failed to converge
14864     *
14865     * <p>Notes:
14866     * <ol>
14867     *
14868     * <li> The date date1+date2 is in the TDB time scale (in practice TT can
14869     *     be used) and is a Julian Date, apportioned in any convenient way
14870     *     between the two arguments.  For example, JD(TDB)=2450123.7 could
14871     *     be expressed in any of these ways, among others:
14872     *<pre>
14873     *            date1          date2
14874     *
14875     *         2450123.7           0.0       (JD method)
14876     *         2451545.0       -1421.3       (J2000 method)
14877     *         2400000.5       50123.2       (MJD method)
14878     *         2450123.5           0.2       (date &amp; time method)
14879     *</pre>
14880     *     The JD method is the most natural and convenient to use in cases
14881     *     where the loss of several decimal digits of resolution is
14882     *     acceptable.  The J2000 method is best matched to the way the
14883     *     argument is handled internally and will deliver the optimum
14884     *     resolution.  The MJD method and the date &amp; time methods are both
14885     *     good compromises between resolution and convenience.  The limited
14886     *     accuracy of the present algorithm is such that any of the methods
14887     *     is satisfactory.
14888     *
14889     * <li> If an np value outside the range 1-8 is supplied, an error status
14890     *     (function value -1) is returned and the pv vector set to zeroes.
14891     *
14892     * <li> For np=3 the result is for the Earth-Moon Barycenter.  To obtain
14893     *     the heliocentric position and velocity of the Earth, use instead
14894     *     the JSOFA function jauEpv00.
14895     *
14896     * <li> On successful return, the array pv contains the following:
14897     *<pre>
14898     *        pv[0][0]   x      }
14899     *        pv[1][0]   y      } heliocentric position, AU
14900     *        pv[2][0]   z      }
14901     *
14902     *        pv[0][1]   xdot   }
14903     *        pv[1][1]   ydot   } heliocentric velocity, AU/d
14904     *        pv[2][1]   zdot   }
14905     *</pre>
14906     *     The reference frame is equatorial and is with respect to the
14907     *     mean equator and equinox of epoch J2000.0.
14908     *
14909     * <li> The algorithm is due to J.L. Simon, P. Bretagnon, J. Chapront,
14910     *     M. Chapront-Touze, G. Francou and J. Laskar (Bureau des
14911     *     Longitudes, Paris, France).  From comparisons with JPL
14912     *     ephemeris DE102, they quote the following maximum errors
14913     *     over the interval 1800-2050:
14914     *<pre>
14915     *                     L (arcsec)    B (arcsec)      R (km)
14916     *
14917     *        Mercury          4             1             300
14918     *        Venus            5             1             800
14919     *        EMB              6             1            1000
14920     *        Mars            17             1            7700
14921     *        Jupiter         71             5           76000
14922     *        Saturn          81            13          267000
14923     *        Uranus          86             7          712000
14924     *        Neptune         11             1          253000
14925     *</pre>
14926     *     Over the interval 1000-3000, they report that the accuracy is no
14927     *     worse than 1.5 times that over 1800-2050.  Outside 1000-3000 the
14928     *     accuracy declines.
14929     *
14930     *     Comparisons of the present function with the JPL DE200 ephemeris
14931     *     give the following RMS errors over the interval 1960-2025:
14932     *<pre>
14933     *                      position (km)     velocity (m/s)
14934     *
14935     *        Mercury            334               0.437
14936     *        Venus             1060               0.855
14937     *        EMB               2010               0.815
14938     *        Mars              7690               1.98
14939     *        Jupiter          71700               7.70
14940     *        Saturn          199000              19.4
14941     *        Uranus          564000              16.4
14942     *        Neptune         158000              14.4
14943     *</pre>
14944     *     Comparisons against DE200 over the interval 1800-2100 gave the
14945     *     following maximum absolute differences.  (The results using
14946     *     DE406 were essentially the same.)
14947     *<pre>
14948     *                   L (arcsec)   B (arcsec)     R (km)   Rdot (m/s)
14949     *
14950     *        Mercury        7            1            500       0.7
14951     *        Venus          7            1           1100       0.9
14952     *        EMB            9            1           1300       1.0
14953     *        Mars          26            1           9000       2.5
14954     *        Jupiter       78            6          82000       8.2
14955     *        Saturn        87           14         263000      24.6
14956     *        Uranus        86            7         661000      27.4
14957     *        Neptune       11            2         248000      21.4
14958     *</pre>
14959     * <li> The present JSOFA re-implementation of the original Simon et al.
14960     *     Fortran code differs from the original in the following respects:
14961     *<ul>
14962     *       <li>  C instead of Fortran.
14963     *
14964     *       <li>  The date is supplied in two parts.
14965     *
14966     *       <li>  The result is returned only in equatorial Cartesian form;
14967     *          the ecliptic longitude, latitude and radius vector are not
14968     *          returned.
14969     *
14970     *       <li>  The result is in the J2000.0 equatorial frame, not ecliptic.
14971     *
14972     *       <li>  More is done in-line: there are fewer calls to subroutines.
14973     *
14974     *       <li>  Different error/warning status values are used.
14975     *
14976     *       <li>  A different Kepler's-equation-solver is used (avoiding
14977     *          use of double precision complex).
14978     *
14979     *       <li>  Polynomials in t are nested to minimize rounding errors.
14980     *
14981     *       <li>  Explicit double constants are used to avoid mixed-mode
14982     *          expressions.
14983     *</ul>
14984     *     None of the above changes affects the result significantly.
14985     *
14986     * <li> The returned status indicates the most serious condition
14987     *     encountered during execution of the function.  Illegal np is
14988     *     considered the most serious, overriding failure to converge,
14989     *     which in turn takes precedence over the remote date warning.
14990     *</ol>
14991     *<p>Called:<ul>
14992     *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
14993     * </ul>
14994     *<p>Reference:  Simon, J.L, Bretagnon, P., Chapront, J.,
14995     *              Chapront-Touze, M., Francou, G., and Laskar, J.,
14996     *              Astron. Astrophys. 282, 663 (1994).
14997     *
14998     *@version 2009 December 17
14999     *
15000     *  @since Release 20101201
15001     *
15002     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
15003     */
15004     public static int jauPlan94(double date1, double date2, int np, double pv[][])
15005     {
15006     /* Gaussian constant */
15007        final double GK = 0.017202098950;
15008 
15009     /* Sin and cos of J2000.0 mean obliquity (IAU 1976) */
15010        final double SINEPS = 0.3977771559319137;
15011        final double COSEPS = 0.9174820620691818;
15012 
15013     /* Maximum number of iterations allowed to solve Kepler's equation */
15014        final int KMAX = 10;
15015 
15016        int jstat, i, k;
15017        double t, da, dl, de, dp, di, dom, dmu, arga, argl, am,
15018               ae, dae, ae2, at, r, v, si2, xq, xp, tl, xsw,
15019               xcw, xm2, xf, ci2, xms, xmc, xpxq2, x, y, z;
15020 
15021     /* Planetary inverse masses */
15022        final double amas[] = { 6023600.0,       /* Mercury */
15023                                        408523.5,       /* Venus   */
15024                                        328900.5,       /* EMB     */
15025                                       3098710.0,       /* Mars    */
15026                                          1047.355,     /* Jupiter */
15027                                          3498.5,       /* Saturn  */
15028                                         22869.0,       /* Uranus  */
15029                                         19314.0 };     /* Neptune */
15030 
15031     /*
15032     * Tables giving the mean Keplerian elements, limited to t^2 terms:
15033     *
15034     *   a       semi-major axis (AU)
15035     *   dlm     mean longitude (degree and arcsecond)
15036     *   e       eccentricity
15037     *   pi      longitude of the perihelion (degree and arcsecond)
15038     *   dinc    inclination (degree and arcsecond)
15039     *   omega   longitude of the ascending node (degree and arcsecond)
15040     */
15041 
15042        final double a[][] = {
15043            {  0.3870983098,           0.0,     0.0 },  /* Mercury */
15044            {  0.7233298200,           0.0,     0.0 },  /* Venus   */
15045            {  1.0000010178,           0.0,     0.0 },  /* EMB     */
15046            {  1.5236793419,         3e-10,     0.0 },  /* Mars    */
15047            {  5.2026032092,     19132e-10, -39e-10 },  /* Jupiter */
15048            {  9.5549091915, -0.0000213896, 444e-10 },  /* Saturn  */
15049            { 19.2184460618,     -3716e-10, 979e-10 },  /* Uranus  */
15050            { 30.1103868694,    -16635e-10, 686e-10 }   /* Neptune */
15051        };
15052 
15053        final double dlm[][] = {
15054            { 252.25090552, 5381016286.88982,  -1.92789 },
15055            { 181.97980085, 2106641364.33548,   0.59381 },
15056            { 100.46645683, 1295977422.83429,  -2.04411 },
15057            { 355.43299958,  689050774.93988,   0.94264 },
15058            {  34.35151874,  109256603.77991, -30.60378 },
15059            {  50.07744430,   43996098.55732,  75.61614 },
15060            { 314.05500511,   15424811.93933,  -1.75083 },
15061            { 304.34866548,    7865503.20744,   0.21103 }
15062        };
15063 
15064        final double e[][] = {
15065            { 0.2056317526,  0.0002040653,    -28349e-10 },
15066            { 0.0067719164, -0.0004776521,     98127e-10 },
15067            { 0.0167086342, -0.0004203654, -0.0000126734 },
15068            { 0.0934006477,  0.0009048438,    -80641e-10 },
15069            { 0.0484979255,  0.0016322542, -0.0000471366 },
15070            { 0.0555481426, -0.0034664062, -0.0000643639 },
15071            { 0.0463812221, -0.0002729293,  0.0000078913 },
15072            { 0.0094557470,  0.0000603263,           0.0 }
15073        };
15074 
15075        final double pi[][] = {
15076            {  77.45611904,  5719.11590,   -4.83016 },
15077            { 131.56370300,   175.48640, -498.48184 },
15078            { 102.93734808, 11612.35290,   53.27577 },
15079            { 336.06023395, 15980.45908,  -62.32800 },
15080            {  14.33120687,  7758.75163,  259.95938 },
15081            {  93.05723748, 20395.49439,  190.25952 },
15082            { 173.00529106,  3215.56238,  -34.09288 },
15083            {  48.12027554,  1050.71912,   27.39717 }
15084        };
15085 
15086        final double dinc[][] = {
15087            { 7.00498625, -214.25629,   0.28977 },
15088            { 3.39466189,  -30.84437, -11.67836 },
15089            {        0.0,  469.97289,  -3.35053 },
15090            { 1.84972648, -293.31722,  -8.11830 },
15091            { 1.30326698,  -71.55890,  11.95297 },
15092            { 2.48887878,   91.85195, -17.66225 },
15093            { 0.77319689,  -60.72723,   1.25759 },
15094            { 1.76995259,    8.12333,   0.08135 }
15095        };
15096 
15097        final double omega[][] = {
15098            {  48.33089304,  -4515.21727,  -31.79892 },
15099            {  76.67992019, -10008.48154,  -51.32614 },
15100            { 174.87317577,  -8679.27034,   15.34191 },
15101            {  49.55809321, -10620.90088, -230.57416 },
15102            { 100.46440702,   6362.03561,  326.52178 },
15103            { 113.66550252,  -9240.19942,  -66.23743 },
15104            {  74.00595701,   2669.15033,  145.93964 },
15105            { 131.78405702,   -221.94322,   -0.78728 }
15106        };
15107 
15108     /* Tables for trigonometric terms to be added to the mean elements of */
15109     /* the semi-major axes */
15110 
15111        final double kp[][] = {
15112         {   69613, 75645, 88306, 59899, 15746, 71087, 142173,  3086,    0 },
15113         {   21863, 32794, 26934, 10931, 26250, 43725,  53867, 28939,    0 },
15114         {   16002, 21863, 32004, 10931, 14529, 16368,  15318, 32794,    0 },
15115         {    6345,  7818, 15636,  7077,  8184, 14163,   1107,  4872,    0 },
15116         {    1760,  1454,  1167,   880,   287,  2640,     19,  2047, 1454 },
15117         {     574,     0,   880,   287,    19,  1760,   1167,   306,  574 },
15118         {     204,     0,   177,  1265,     4,   385,    200,   208,  204 },
15119         {       0,   102,   106,     4,    98,  1367,    487,   204,    0 }
15120        };
15121 
15122        final double ca[][] = {
15123         {       4,    -13,    11,   -9,    -9,   -3,     -1,     4,     0 },
15124         {    -156,     59,   -42,    6,    19,  -20,    -10,   -12,     0 },
15125         {      64,   -152,    62,   -8,    32,  -41,     19,   -11,     0 },
15126         {     124,    621,  -145,  208,    54,  -57,     30,    15,     0 },
15127         {  -23437,  -2634,  6601, 6259, -1507,-1821,   2620, -2115, -1489 },
15128         {   62911,-119919, 79336,17814,-24241,12068,   8306, -4893,  8902 },
15129         {  389061,-262125,-44088, 8387,-22976,-2093,   -615, -9720,  6633 },
15130         { -412235,-157046,-31430,37817, -9740,  -13,  -7449,  9644,     0 }
15131        };
15132 
15133        final double sa[][] = {
15134         {     -29,    -1,     9,     6,    -6,     5,     4,     0,     0 },
15135         {     -48,  -125,   -26,   -37,    18,   -13,   -20,    -2,     0 },
15136         {    -150,   -46,    68,    54,    14,    24,   -28,    22,     0 },
15137         {    -621,   532,  -694,   -20,   192,   -94,    71,   -73,     0 },
15138         {  -14614,-19828, -5869,  1881, -4372, -2255,   782,   930,   913 },
15139         {  139737,     0, 24667, 51123, -5102,  7429, -4095, -1976, -9566 },
15140         { -138081,     0, 37205,-49039,-41901,-33872,-27037,-12474, 18797 },
15141         {       0, 28492,133236, 69654, 52322,-49577,-26430, -3593,     0 }
15142        };
15143 
15144     /* Tables giving the trigonometric terms to be added to the mean */
15145     /* elements of the mean longitudes */
15146 
15147        final double kq[][] = {
15148         {   3086,15746,69613,59899,75645,88306, 12661,  2658,    0,     0 },
15149         {  21863,32794,10931,   73, 4387,26934,  1473,  2157,    0,     0 },
15150         {     10,16002,21863,10931, 1473,32004,  4387,    73,    0,     0 },
15151         {     10, 6345, 7818, 1107,15636, 7077,  8184,   532,   10,     0 },
15152         {     19, 1760, 1454,  287, 1167,  880,   574,  2640,   19,  1454 },
15153         {     19,  574,  287,  306, 1760,   12,    31,    38,   19,   574 },
15154         {      4,  204,  177,    8,   31,  200,  1265,   102,    4,   204 },
15155         {      4,  102,  106,    8,   98, 1367,   487,   204,    4,   102 }
15156        };
15157 
15158        final double cl[][] = {
15159         {      21,   -95, -157,   41,   -5,   42,  23,  30,      0,     0 },
15160         {    -160,  -313, -235,   60,  -74,  -76, -27,  34,      0,     0 },
15161         {    -325,  -322,  -79,  232,  -52,   97,  55, -41,      0,     0 },
15162         {    2268,  -979,  802,  602, -668,  -33, 345, 201,    -55,     0 },
15163         {    7610, -4997,-7689,-5841,-2617, 1115,-748,-607,   6074,   354 },
15164         {  -18549, 30125,20012, -730,  824,   23,1289,-352, -14767, -2062 },
15165         { -135245,-14594, 4197,-4030,-5630,-2898,2540,-306,   2939,  1986 },
15166         {   89948,  2103, 8963, 2695, 3682, 1648, 866,-154,  -1963,  -283 }
15167        };
15168 
15169        final double sl[][] = {
15170         {   -342,   136,  -23,   62,   66,  -52, -33,    17,     0,     0 },
15171         {    524,  -149,  -35,  117,  151,  122, -71,   -62,     0,     0 },
15172         {   -105,  -137,  258,   35, -116,  -88,-112,   -80,     0,     0 },
15173         {    854,  -205, -936, -240,  140, -341, -97,  -232,   536,     0 },
15174         { -56980,  8016, 1012, 1448,-3024,-3710, 318,   503,  3767,   577 },
15175         { 138606,-13478,-4964, 1441,-1319,-1482, 427,  1236, -9167, -1918 },
15176         {  71234,-41116, 5334,-4935,-1848,   66, 434, -1748,  3780,  -701 },
15177         { -47645, 11647, 2166, 3194,  679,    0,-244,  -419, -2531,    48 }
15178        };
15179 
15180     /*--------------------------------------------------------------------*/
15181 
15182     /* Validate the planet number. */
15183        if ((np < 1) || (np > 8)) {
15184           jstat = -1;
15185 
15186        /* Reset the result in case of failure. */
15187           for (k = 0; k < 2; k++) {
15188              for (i = 0; i < 3; i++) {
15189                 pv[k][i] = 0.0;
15190              }
15191           }
15192 
15193        } else {
15194 
15195        /* Decrement the planet number to start at zero. */
15196           np--;
15197 
15198        /* Time: Julian millennia since J2000.0. */
15199           t = ((date1 - DJ00) + date2) / DJM;
15200 
15201        /* OK status unless remote date. */
15202           jstat = abs(t) <= 1.0 ? 0 : 1;
15203 
15204        /* Compute the mean elements. */
15205           da = a[np][0] +
15206               (a[np][1] +
15207                a[np][2] * t) * t;
15208           dl = (3600.0 * dlm[np][0] +
15209                         (dlm[np][1] +
15210                          dlm[np][2] * t) * t) * DAS2R;
15211           de = e[np][0] +
15212              ( e[np][1] +
15213                e[np][2] * t) * t;
15214           dp = jauAnpm((3600.0 * pi[np][0] +
15215                                 (pi[np][1] +
15216                                  pi[np][2] * t) * t) * DAS2R);
15217           di = (3600.0 * dinc[np][0] +
15218                         (dinc[np][1] +
15219                          dinc[np][2] * t) * t) * DAS2R;
15220           dom = jauAnpm((3600.0 * omega[np][0] +
15221                                  (omega[np][1] +
15222                                   omega[np][2] * t) * t) * DAS2R);
15223 
15224        /* Apply the trigonometric terms. */
15225           dmu = 0.35953620 * t;
15226           for (k = 0; k < 8; k++) {
15227              arga = kp[np][k] * dmu;
15228              argl = kq[np][k] * dmu;
15229              da += (ca[np][k] * cos(arga) +
15230                     sa[np][k] * sin(arga)) * 1e-7;
15231              dl += (cl[np][k] * cos(argl) +
15232                     sl[np][k] * sin(argl)) * 1e-7;
15233           }
15234           arga = kp[np][8] * dmu;
15235           da += t * (ca[np][8] * cos(arga) +
15236                      sa[np][8] * sin(arga)) * 1e-7;
15237           for (k = 8; k < 10; k++) {
15238              argl = kq[np][k] * dmu;
15239              dl += t * (cl[np][k] * cos(argl) +
15240                         sl[np][k] * sin(argl)) * 1e-7;
15241           }
15242           dl = fmod(dl, D2PI);
15243 
15244        /* Iterative soln. of Kepler's equation to get eccentric anomaly. */
15245           am = dl - dp;
15246           ae = am + de * sin(am);
15247           k = 0;
15248           dae = 1.0;
15249           while (k < KMAX && abs(dae) > 1e-12) {
15250              dae = (am - ae + de * sin(ae)) / (1.0 - de * cos(ae));
15251              ae += dae;
15252              k++;
15253              if (k == KMAX-1) jstat = 2;
15254           }
15255 
15256        /* True anomaly. */
15257           ae2 = ae / 2.0;
15258           at = 2.0 * atan2(sqrt((1.0 + de) / (1.0 - de)) * sin(ae2),
15259                                                            cos(ae2));
15260 
15261        /* Distance (AU) and speed (radians per day). */
15262           r = da * (1.0 - de * cos(ae));
15263           v = GK * sqrt((1.0 + 1.0 / amas[np]) / (da * da * da));
15264 
15265           si2 = sin(di / 2.0);
15266           xq = si2 * cos(dom);
15267           xp = si2 * sin(dom);
15268           tl = at + dp;
15269           xsw = sin(tl);
15270           xcw = cos(tl);
15271           xm2 = 2.0 * (xp * xcw - xq * xsw);
15272           xf = da / sqrt(1  -  de * de);
15273           ci2 = cos(di / 2.0);
15274           xms = (de * sin(dp) + xsw) * xf;
15275           xmc = (de * cos(dp) + xcw) * xf;
15276           xpxq2 = 2 * xp * xq;
15277 
15278        /* Position (J2000.0 ecliptic x,y,z in AU). */
15279           x = r * (xcw - xm2 * xp);
15280           y = r * (xsw + xm2 * xq);
15281           z = r * (-xm2 * ci2);
15282 
15283        /* Rotate to equatorial. */
15284           pv[0][0] = x;
15285           pv[0][1] = y * COSEPS - z * SINEPS;
15286           pv[0][2] = y * SINEPS + z * COSEPS;
15287 
15288        /* Velocity (J2000.0 ecliptic xdot,ydot,zdot in AU/d). */
15289           x = v * (( -1.0 + 2.0 * xp * xp) * xms + xpxq2 * xmc);
15290           y = v * ((  1.0 - 2.0 * xq * xq) * xmc - xpxq2 * xms);
15291           z = v * (2.0 * ci2 * (xp * xms + xq * xmc));
15292 
15293        /* Rotate to equatorial. */
15294           pv[1][0] = x;
15295           pv[1][1] = y * COSEPS - z * SINEPS;
15296           pv[1][2] = y * SINEPS + z * COSEPS;
15297 
15298        }
15299 
15300     /* Return the status. */
15301        return jstat;
15302 
15303         }
15304     
15305 
15306     /**
15307     *  Modulus of p-vector.
15308     *
15309     *<p>This function is derived from the International Astronomical Union's
15310     *  SOFA (Standards Of Fundamental Astronomy) software collection.
15311     *
15312     *<p>Status:  vector/matrix support function.
15313     *
15314     *<!-- Given: -->
15315     *     @param p       double[3]      p-vector
15316     *
15317     * <!-- Returned (function value): -->
15318     *  @return double        modulus
15319     *
15320     *@version 2008 May 22
15321     *
15322     *  @since Release 20101201
15323     *
15324     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
15325     */
15326     public static double jauPm(double p[] )
15327     {
15328        double w;
15329 
15330 
15331        w  = sqrt( p[0] * p[0]
15332                 + p[1] * p[1]
15333                 + p[2] * p[2] );
15334 
15335        return w;
15336 
15337         }
15338     
15339 
15340     /**
15341     *  Precession matrix (including frame bias) from GCRS to a specified
15342     *  date, IAU 2000 model.
15343     *
15344     *<p>This function is derived from the International Astronomical Union's
15345     *  SOFA (Standards Of Fundamental Astronomy) software collection.
15346     *
15347     *<p>Status:  support function.
15348     *
15349     *<!-- Given: -->
15350     *     @param date1 double TT as a 2-part Julian Date (Note 1)
15351     *     @param date2 double TT as a 2-part Julian Date (Note 1)
15352     *
15353     *<!-- Returned: -->
15354     *     @return rbp           double[3][3]      <u>returned</u> bias-precession matrix (Note 2)
15355     *
15356     * <p>Notes:
15357     * <ol>
15358     *
15359     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
15360     *     convenient way between the two arguments.  For example,
15361     *     JD(TT)=2450123.7 could be expressed in any of these ways,
15362     *     among others:
15363     *<pre>
15364     *            date1          date2
15365     *
15366     *         2450123.7           0.0       (JD method)
15367     *         2451545.0       -1421.3       (J2000 method)
15368     *         2400000.5       50123.2       (MJD method)
15369     *         2450123.5           0.2       (date &amp; time method)
15370     *</pre>
15371     *     The JD method is the most natural and convenient to use in
15372     *     cases where the loss of several decimal digits of resolution
15373     *     is acceptable.  The J2000 method is best matched to the way
15374     *     the argument is handled internally and will deliver the
15375     *     optimum resolution.  The MJD method and the date &amp; time methods
15376     *     are both good compromises between resolution and convenience.
15377     *
15378     * <li> The matrix operates in the sense V(date) = rbp * V(GCRS), where
15379     *     the p-vector V(GCRS) is with respect to the Geocentric Celestial
15380     *     Reference System (IAU, 2000) and the p-vector V(date) is with
15381     *     respect to the mean equatorial triad of the given date.
15382     *</ol>
15383     *<p>Called:<ul>
15384     *     <li>{@link #jauBp00} frame bias and precession matrices, IAU 2000
15385     * </ul>
15386     *<p>Reference:
15387     *
15388     *     IAU: Trans. International Astronomical Union, Vol. XXIVB;  Proc.
15389     *     24th General Assembly, Manchester, UK.  Resolutions B1.3, B1.6.
15390     *     (2000)
15391     *
15392     *@version 2009 December 21
15393     *
15394     *  @since Release 20101201
15395     *
15396     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
15397     */
15398     public static double[][] jauPmat00(double date1, double date2)
15399     {
15400        double rb[][] = new double[3][3], rp[][] = new double[3][3],
15401            rbp[][] = new double[3][3];
15402     /* Obtain the required matrix (discarding others). */
15403        jauBp00(date1, date2, rb, rp, rbp);
15404 
15405        return rbp;
15406 
15407         }
15408     
15409 
15410     /**
15411     *  Precession matrix (including frame bias) from GCRS to a specified
15412     *  date, IAU 2006 model.
15413     *
15414     *<p>This function is derived from the International Astronomical Union's
15415     *  SOFA (Standards Of Fundamental Astronomy) software collection.
15416     *
15417     *<p>Status:  support function.
15418     *
15419     *<!-- Given: -->
15420     *     @param date1 double TT as a 2-part Julian Date (Note 1)
15421     *     @param date2 double TT as a 2-part Julian Date (Note 1)
15422     *
15423     *<!-- Returned: -->
15424     *     @return rbp           double[3][3]      <u>returned</u> bias-precession matrix (Note 2)
15425     *
15426     * <p>Notes:
15427     * <ol>
15428     *
15429     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
15430     *     convenient way between the two arguments.  For example,
15431     *     JD(TT)=2450123.7 could be expressed in any of these ways,
15432     *     among others:
15433     *<pre>
15434     *            date1          date2
15435     *
15436     *         2450123.7           0.0       (JD method)
15437     *         2451545.0       -1421.3       (J2000 method)
15438     *         2400000.5       50123.2       (MJD method)
15439     *         2450123.5           0.2       (date &amp; time method)
15440     *</pre>
15441     *     The JD method is the most natural and convenient to use in
15442     *     cases where the loss of several decimal digits of resolution
15443     *     is acceptable.  The J2000 method is best matched to the way
15444     *     the argument is handled internally and will deliver the
15445     *     optimum resolution.  The MJD method and the date &amp; time methods
15446     *     are both good compromises between resolution and convenience.
15447     *
15448     * <li> The matrix operates in the sense V(date) = rbp * V(GCRS), where
15449     *     the p-vector V(GCRS) is with respect to the Geocentric Celestial
15450     *     Reference System (IAU, 2000) and the p-vector V(date) is with
15451     *     respect to the mean equatorial triad of the given date.
15452     *</ol>
15453     *<p>Called:<ul>
15454     *     <li>{@link #jauPfw06} bias-precession F-W angles, IAU 2006
15455     *     <li>{@link #jauFw2m} F-W angles to r-matrix
15456     * </ul>
15457     *<p>References:
15458     *
15459     *    <p>Capitaine, N. &amp; Wallace, P.T., 2006, Astron.Astrophys. 450, 855
15460     *
15461     *    <p>Wallace, P.T. &amp; Capitaine, N., 2006, Astron.Astrophys. 459, 981
15462     *
15463     *@version 2009 December 21
15464     *
15465     *  @since Release 20101201
15466     *
15467     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
15468     */
15469     public static double[][] jauPmat06(double date1, double date2)
15470     {
15471 
15472     /* Bias-precession Fukushima-Williams angles. */
15473        FWPrecessionAngles fw = jauPfw06(date1, date2);
15474 
15475     /* Form the matrix. */
15476        double[][] rbp = jauFw2m(fw.gamb, fw.phib, fw.psib, fw.epsa );
15477 
15478        return rbp;
15479 
15480         }
15481     
15482 
15483     /**
15484     *  Precession matrix from J2000.0 to a specified date, IAU 1976 model.
15485     *
15486     *<p>This function is derived from the International Astronomical Union's
15487     *  SOFA (Standards Of Fundamental Astronomy) software collection.
15488     *
15489     *<p>Status:  support function.
15490     *
15491     *<!-- Given: -->
15492     *     @param date1 double        ending date, TT (Note 1)
15493     *     @param date2 double        ending date, TT (Note 1) 
15494     *
15495     *<!-- Returned: -->
15496     *     @return rmatp        double[3][3]   <u>returned</u> precession matrix, J2000.0 -&gt; date1+date2
15497     *
15498     * <p>Notes:
15499     * <ol>
15500     *
15501     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
15502     *     convenient way between the two arguments.  For example,
15503     *     JD(TT)=2450123.7 could be expressed in any of these ways,
15504     *     among others:
15505     *<pre>
15506     *            date1          date2
15507     *
15508     *         2450123.7           0.0       (JD method)
15509     *         2451545.0       -1421.3       (J2000 method)
15510     *         2400000.5       50123.2       (MJD method)
15511     *         2450123.5           0.2       (date &amp; time method)
15512     *</pre>
15513     *     The JD method is the most natural and convenient to use in
15514     *     cases where the loss of several decimal digits of resolution
15515     *     is acceptable.  The J2000 method is best matched to the way
15516     *     the argument is handled internally and will deliver the
15517     *     optimum resolution.  The MJD method and the date &amp; time methods
15518     *     are both good compromises between resolution and convenience.
15519     *
15520     * <li> The matrix operates in the sense V(date) = RMATP * V(J2000),
15521     *     where the p-vector V(J2000) is with respect to the mean
15522     *     equatorial triad of epoch J2000.0 and the p-vector V(date)
15523     *     is with respect to the mean equatorial triad of the given
15524     *     date.
15525     *
15526     * <li> Though the matrix method itself is rigorous, the precession
15527     *     angles are expressed through canonical polynomials which are
15528     *     valid only for a limited time span.  In addition, the IAU 1976
15529     *     precession rate is known to be imperfect.  The absolute accuracy
15530     *     of the present formulation is better than 0.1 arcsec from
15531     *     1960AD to 2040AD, better than 1 arcsec from 1640AD to 2360AD,
15532     *     and remains below 3 arcsec for the whole of the period
15533     *     500BC to 3000AD.  The errors exceed 10 arcsec outside the
15534     *     range 1200BC to 3900AD, exceed 100 arcsec outside 4200BC to
15535     *     5600AD and exceed 1000 arcsec outside 6800BC to 8200AD.
15536     *</ol>
15537     *<p>Called:<ul>
15538     *     <li>{@link #jauPrec76} accumulated precession angles, IAU 1976
15539     *     <li>{@link #jauIr} initialize r-matrix to identity
15540     *     <li>{@link #jauRz} rotate around Z-axis
15541     *     <li>{@link #jauRy} rotate around Y-axis
15542     *     <li>{@link #jauCr} copy r-matrix
15543     * </ul>
15544     *<p>References:
15545     *
15546     *     <p>Lieske, J.H., 1979, Astron.Astrophys. 73, 282.
15547     *      equations (6) &amp; (7), p283.
15548     *
15549     *     Kaplan,G.H., 1981. USNO circular no. 163, pA2.
15550     *
15551     *@version 2009 December 18
15552     *
15553     *  @since Release 20101201
15554     *
15555     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
15556     */
15557     public static double[][] jauPmat76(double date1, double date2)
15558     {
15559        double wmat[][] = new double[3][3];
15560        double rmatp[][] = new double[3][3];
15561 
15562     /* Precession Euler angles, J2000.0 to specified date. */
15563        EulerAngles euler = jauPrec76(DJ00, 0.0, date1, date2);
15564 
15565     /* Form the rotation matrix. */
15566        jauIr(  wmat);
15567        jauRz( -euler.zeta, wmat);
15568        jauRy(  euler.theta, wmat);
15569        jauRz( -euler.z, wmat);
15570        jauCr(wmat, rmatp);
15571 
15572        return rmatp;
15573 
15574         }
15575     
15576 
15577     /**
15578     *  P-vector subtraction.
15579     *
15580     *<p>This function is derived from the International Astronomical Union's
15581     *  SOFA (Standards Of Fundamental Astronomy) software collection.
15582     *
15583     *<p>Status:  vector/matrix support function.
15584     *
15585     *<!-- Given: -->
15586     *     @param a         double[3]       first p-vector
15587     *     @param b         double[3]       second p-vector
15588     *
15589     *<!-- Returned: -->
15590     *     @return amb       double[3]        <u>returned</u> a - b
15591     *
15592     *  Note:
15593     *     It is permissible to re-use the same array for any of the
15594     *     arguments.
15595     *
15596     *@version 2008 November 18
15597     *
15598     *  @since Release 20101201
15599     *
15600     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
15601     */
15602     public static double[]  jauPmp(double a[] , double b[]  )
15603     {
15604        double amb[] = new double[3];
15605        amb[0] = a[0] - b[0];
15606        amb[1] = a[1] - b[1];
15607        amb[2] = a[2] - b[2];
15608 
15609        return amb;
15610 
15611         }
15612     
15613     /**
15614      * A normalized vector with r being the modulus and u[3] being the unit vector.
15615      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 1 Feb 2010
15616      * 
15617      * @since AIDA Stage 1
15618      */
15619     public static class NormalizedVector {
15620         public double r;
15621         public double u[];
15622         public NormalizedVector(double r, double u[] ) {
15623             this.r = r;
15624             this.u = u;
15625         }
15626     }
15627     /**
15628     *  Convert a p-vector into modulus and unit vector.
15629     *
15630     *<p>This function is derived from the International Astronomical Union's
15631     *  SOFA (Standards Of Fundamental Astronomy) software collection.
15632     *
15633     *<p>Status:  vector/matrix support function.
15634     *
15635     *<!-- Given: -->
15636     *     @param p         double[3]       p-vector
15637     *
15638     *<!-- Returned: -->
15639     *     @return r         double           <u>returned</u> modulus
15640     *             u         double[3]        <u>returned</u> unit vector
15641     *
15642     * <p>Notes:
15643     * <ol>
15644     *
15645     * <li> If p is null, the result is null.  Otherwise the result is a unit
15646     *     vector.
15647     *
15648     * <li> It is permissible to re-use the same array for any of the
15649     *     arguments.
15650     *</ol>
15651     *<p>Called:<ul>
15652     *     <li>{@link #jauPm} modulus of p-vector
15653     *     <li>{@link #jauZp} zero p-vector
15654     *     <li>{@link #jauSxp} multiply p-vector by scalar
15655     * </ul>
15656     *@version 2008 November 18
15657     *
15658     *  @since Release 20101201
15659     *
15660     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
15661     */
15662     public static NormalizedVector jauPn(double p[])
15663     {
15664        double w;
15665 
15666     /* Obtain the modulus and test for zero. */
15667        w = jauPm(p);
15668        NormalizedVector nv = new NormalizedVector(w, new double[3]);
15669        if (w == 0.0) {
15670 
15671        /* Null vector. */
15672           jauZp(nv.u);
15673 
15674        } else {
15675 
15676        /* Unit vector. */
15677            nv.u = jauSxp(1.0/w, p);
15678        }
15679 
15680 
15681        return nv;
15682 
15683         }
15684     
15685 
15686     /**
15687     *  Precession-nutation, IAU 2000 model:  a multi-purpose function,
15688     *  supporting classical (equinox-based) use directly and CIO-based
15689     *  use indirectly.
15690     *
15691     *<p>This function is derived from the International Astronomical Union's
15692     *  SOFA (Standards Of Fundamental Astronomy) software collection.
15693     *
15694     *<p>Status:  support function.
15695     *
15696     *<!-- Given: -->
15697     *     @param date1 double TT as a 2-part Julian Date (Note 1)
15698     *     @param date2 double TT as a 2-part Julian Date (Note 1)
15699     *     @param dpsi double           nutation (Note 2)
15700     *     @param deps double           nutation (Note 2) 
15701     *
15702     *<!-- Returned: -->
15703     *     @return epsa          double            <u>returned</u> mean obliquity (Note 3),
15704     *             rb            double[3][3]      <u>returned</u> frame bias matrix (Note 4),
15705     *             rp            double[3][3]      <u>returned</u> precession matrix (Note 5),
15706     *             rbp           double[3][3]      <u>returned</u> bias-precession matrix (Note 6),
15707     *             rn            double[3][3]      <u>returned</u> nutation matrix (Note 7),
15708     *             rbpn          double[3][3]      <u>returned</u> GCRS-to-true matrix (Note 8)
15709     *
15710     * <p>Notes:
15711     * <ol>
15712     *
15713     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
15714     *     convenient way between the two arguments.  For example,
15715     *     JD(TT)=2450123.7 could be expressed in any of these ways,
15716     *     among others:
15717     *<pre>
15718     *            date1          date2
15719     *
15720     *         2450123.7           0.0       (JD method)
15721     *         2451545.0       -1421.3       (J2000 method)
15722     *         2400000.5       50123.2       (MJD method)
15723     *         2450123.5           0.2       (date &amp; time method)
15724     *</pre>
15725     *     The JD method is the most natural and convenient to use in
15726     *     cases where the loss of several decimal digits of resolution
15727     *     is acceptable.  The J2000 method is best matched to the way
15728     *     the argument is handled internally and will deliver the
15729     *     optimum resolution.  The MJD method and the date &amp; time methods
15730     *     are both good compromises between resolution and convenience.
15731     *
15732     * <li> The caller is responsible for providing the nutation components;
15733     *     they are in longitude and obliquity, in radians and are with
15734     *     respect to the equinox and ecliptic of date.  For high-accuracy
15735     *     applications, free core nutation should be included as well as
15736     *     any other relevant corrections to the position of the CIP.
15737     *
15738     * <li> The returned mean obliquity is consistent with the IAU 2000
15739     *     precession-nutation models.
15740     *
15741     * <li> The matrix rb transforms vectors from GCRS to J2000.0 mean
15742     *     equator and equinox by applying frame bias.
15743     *
15744     * <li> The matrix rp transforms vectors from J2000.0 mean equator and
15745     *     equinox to mean equator and equinox of date by applying
15746     *     precession.
15747     *
15748     * <li> The matrix rbp transforms vectors from GCRS to mean equator and
15749     *     equinox of date by applying frame bias then precession.  It is
15750     *     the product rp x rb.
15751     *
15752     * <li> The matrix rn transforms vectors from mean equator and equinox of
15753     *     date to true equator and equinox of date by applying the nutation
15754     *     (luni-solar + planetary).
15755     *
15756     * <li> The matrix rbpn transforms vectors from GCRS to true equator and
15757     *     equinox of date.  It is the product rn x rbp, applying frame
15758     *     bias, precession and nutation in that order.
15759     *
15760     * <li> It is permissible to re-use the same array in the returned
15761     *     arguments.  The arrays are filled in the order given.
15762     *</ol>
15763     *<p>Called:<ul>
15764     *     <li>{@link #jauPr00} IAU 2000 precession adjustments
15765     *     <li>{@link #jauObl80} mean obliquity, IAU 1980
15766     *     <li>{@link #jauBp00} frame bias and precession matrices, IAU 2000
15767     *     <li>{@link #jauCr} copy r-matrix
15768     *     <li>{@link #jauNumat} form nutation matrix
15769     *     <li>{@link #jauRxr} product of two r-matrices
15770     * </ul>
15771     *<p>Reference:
15772     *
15773     *    <p>Capitaine, N., Chapront, J., Lambert, S. and Wallace, P.,
15774     *     "Expressions for the Celestial Intermediate Pole and Celestial
15775     *     Ephemeris Origin consistent with the IAU 2000A precession-
15776     *     nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
15777     *
15778     *     n.b. The celestial ephemeris origin (CEO) was renamed "celestial
15779     *          intermediate origin" (CIO) by IAU 2006 Resolution 2.
15780     *
15781     *@version 2010 January 18
15782     *
15783     *  @since Release 20101201
15784     *
15785     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
15786     */
15787     public static PrecessionNutation  jauPn00(double date1, double date2, double dpsi, double deps)
15788     {
15789        double  rbpw[][] = new double[3][3], rnw[][] = new double[3][3];
15790        double[][] rb = new double[3][3];
15791        double[][] rp = new double[3][3];
15792        double[][] rbp = new double[3][3];
15793        double[][] rn = new double[3][3];
15794        double[][] rbpn = new double[3][3];
15795 
15796 
15797     /* IAU 2000 precession-rate adjustments. */
15798        PrecessionDeltaTerms nut = jauPr00(date1, date2);
15799 
15800     /* Mean obliquity, consistent with IAU 2000 precession-nutation. */
15801        double epsa = jauObl80(date1, date2) + nut.depspr;
15802 
15803     /* Frame bias and precession matrices and their product. */
15804        jauBp00(date1, date2, rb, rp, rbpw);
15805        jauCr(rbpw, rbp);
15806 
15807     /* Nutation matrix. */
15808        rnw = jauNumat(epsa, dpsi, deps);
15809        jauCr(rnw, rn);
15810 
15811     /* Bias-precession-nutation matrix (classical). */
15812        rbpn = jauRxr(rnw, rbpw);
15813 
15814        return new PrecessionNutation(dpsi, deps, epsa, rb, rp, rbp, rn, rbpn);
15815 
15816         }
15817     
15818 
15819     /**
15820      * Precession-nutation model. 
15821      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
15822      * 
15823      * @since AIDA Stage 1
15824      */
15825     public static class PrecessionNutation {
15826         public NutationTerms nut;
15827         /** mean obliquity */
15828         public  double epsa;
15829         /** frame bias matrix */
15830         public double rb[][];
15831         /** precession matrix  */
15832         public  double rp[][];
15833         /** bias-precession matrix */
15834         public  double rbp[][];
15835         /** nutation matrix  */
15836         public double rn[][];
15837         /** GCRS-to-true matrix */
15838         public double rbpn[][];
15839         public PrecessionNutation(double dpsi, double deps, double epsa,
15840                   double rb[][], double rp[][], double rbp[][],
15841                   double rn[][], double rbpn[][]){
15842             this.nut = new NutationTerms(dpsi, deps);
15843             this.epsa = epsa;
15844             this.rb = rb; 
15845             this.rp = rp;
15846             this.rbp = rbp;
15847             this.rn = rn;
15848             this.rbpn = rbpn;
15849         }
15850         
15851     }
15852     /**
15853     *  Precession-nutation, IAU 2000A model:  a multi-purpose function,
15854     *  supporting classical (equinox-based) use directly and CIO-based
15855     *  use indirectly.
15856     *
15857     *<p>This function is derived from the International Astronomical Union's
15858     *  SOFA (Standards Of Fundamental Astronomy) software collection.
15859     *
15860     *<p>Status:  support function.
15861     *
15862     *<!-- Given: -->
15863     *     @param date1 double TT as a 2-part Julian Date (Note 1)
15864     *     @param date2 double TT as a 2-part Julian Date (Note 1)
15865     *
15866     *<!-- Returned: -->
15867     *     @return dpsi double            <u>returned</u> nutation (Note 2)
15868     *             deps double            <u>returned</u> nutation (Note 2) 
15869     *             epsa          double            <u>returned</u> mean obliquity (Note 3)
15870     *             rb            double[3][3]      <u>returned</u> frame bias matrix (Note 4)
15871     *             rp            double[3][3]      <u>returned</u> precession matrix (Note 5)
15872     *             rbp           double[3][3]      <u>returned</u> bias-precession matrix (Note 6)
15873     *             rn            double[3][3]      <u>returned</u> nutation matrix (Note 7)
15874     *             rbpn          double[3][3]      <u>returned</u> GCRS-to-true matrix (Notes 8,9)
15875     *
15876     * <p>Notes:
15877     * <ol>
15878     *
15879     * <li>  The TT date date1+date2 is a Julian Date, apportioned in any
15880     *      convenient way between the two arguments.  For example,
15881     *      JD(TT)=2450123.7 could be expressed in any of these ways,
15882     *      among others:
15883     *<pre>
15884     *             date1          date2
15885     *
15886     *          2450123.7           0.0       (JD method)
15887     *          2451545.0       -1421.3       (J2000 method)
15888     *          2400000.5       50123.2       (MJD method)
15889     *          2450123.5           0.2       (date &amp; time method)
15890     *</pre>
15891     *      The JD method is the most natural and convenient to use in
15892     *      cases where the loss of several decimal digits of resolution
15893     *      is acceptable.  The J2000 method is best matched to the way
15894     *      the argument is handled internally and will deliver the
15895     *      optimum resolution.  The MJD method and the date &amp; time methods
15896     *      are both good compromises between resolution and convenience.
15897     *
15898     * <li>  The nutation components (luni-solar + planetary, IAU 2000A) in
15899     *      longitude and obliquity are in radians and with respect to the
15900     *      equinox and ecliptic of date.  Free core nutation is omitted;
15901     *      for the utmost accuracy, use the jauPn00  function, where the
15902     *      nutation components are caller-specified.  For faster but
15903     *      slightly less accurate results, use the jauPn00b function.
15904     *
15905     * <li>  The mean obliquity is consistent with the IAU 2000 precession.
15906     *
15907     * <li>  The matrix rb transforms vectors from GCRS to J2000.0 mean
15908     *      equator and equinox by applying frame bias.
15909     *
15910     * <li>  The matrix rp transforms vectors from J2000.0 mean equator and
15911     *      equinox to mean equator and equinox of date by applying
15912     *      precession.
15913     *
15914     * <li>  The matrix rbp transforms vectors from GCRS to mean equator and
15915     *      equinox of date by applying frame bias then precession.  It is
15916     *      the product rp x rb.
15917     *
15918     * <li>  The matrix rn transforms vectors from mean equator and equinox
15919     *      of date to true equator and equinox of date by applying the
15920     *      nutation (luni-solar + planetary).
15921     *
15922     * <li>  The matrix rbpn transforms vectors from GCRS to true equator and
15923     *      equinox of date.  It is the product rn x rbp, applying frame
15924     *      bias, precession and nutation in that order.
15925     *
15926     * <li>  The X,Y,Z coordinates of the IAU 2000A Celestial Intermediate
15927     *      Pole are elements (3,1-3) of the GCRS-to-true matrix,
15928     *       i.e. rbpn[2][0-2].
15929     *
15930     *  <li> It is permissible to re-use the same array in the returned
15931     *      arguments.  The arrays are filled in the order given.
15932     *</ol>
15933     *<p>Called:<ul>
15934     *     <li>{@link #jauNut00a} nutation, IAU 2000A
15935     *     <li>{@link #jauPn00} bias/precession/nutation results, IAU 2000
15936     * </ul>
15937     *<p>Reference:
15938     *
15939     *    <p>Capitaine, N., Chapront, J., Lambert, S. and Wallace, P.,
15940     *     "Expressions for the Celestial Intermediate Pole and Celestial
15941     *     Ephemeris Origin consistent with the IAU 2000A precession-
15942     *     nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
15943     *
15944     *     n.b. The celestial ephemeris origin (CEO) was renamed "celestial
15945     *          intermediate origin" (CIO) by IAU 2006 Resolution 2.
15946     *
15947     *@version 2010 January 18
15948     *
15949     *  @since Release 20101201
15950     *
15951     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
15952     */
15953     public static PrecessionNutation jauPn00a(double date1, double date2)
15954     {
15955     /* Nutation. */
15956        NutationTerms nut = jauNut00a(date1, date2);
15957 
15958     /* Remaining results. */
15959        return jauPn00(date1, date2, nut.dpsi, nut.deps);
15960 
15961  
15962         }
15963     
15964 
15965     /**
15966     *  Precession-nutation, IAU 2000B model:  a multi-purpose function,
15967     *  supporting classical (equinox-based) use directly and CIO-based
15968     *  use indirectly.
15969     *
15970     *<p>This function is derived from the International Astronomical Union's
15971     *  SOFA (Standards Of Fundamental Astronomy) software collection.
15972     *
15973     *<p>Status:  support function.
15974     *
15975     *<!-- Given: -->
15976     *     @param date1 double TT as a 2-part Julian Date (Note 1)
15977     *     @param date2 double TT as a 2-part Julian Date (Note 1)
15978     *
15979     *<!-- Returned: -->
15980     *     @return dpsi,deps     double            <u>returned</u> nutation (Note 2)
15981     *             epsa          double            <u>returned</u> mean obliquity (Note 3)
15982     *             rb            double[3][3]      <u>returned</u> frame bias matrix (Note 4)
15983     *             rp            double[3][3]      <u>returned</u> precession matrix (Note 5)
15984     *             rbp           double[3][3]      <u>returned</u> bias-precession matrix (Note 6)
15985     *             rn            double[3][3]      <u>returned</u> nutation matrix (Note 7)
15986     *             rbpn          double[3][3]      <u>returned</u> GCRS-to-true matrix (Notes 8,9)
15987     *
15988     * <p>Notes:
15989     * <ol>
15990     *
15991     * <li>  The TT date date1+date2 is a Julian Date, apportioned in any
15992     *      convenient way between the two arguments.  For example,
15993     *      JD(TT)=2450123.7 could be expressed in any of these ways,
15994     *      among others:
15995     *<pre>
15996     *             date1          date2
15997     *
15998     *          2450123.7           0.0       (JD method)
15999     *          2451545.0       -1421.3       (J2000 method)
16000     *          2400000.5       50123.2       (MJD method)
16001     *          2450123.5           0.2       (date &amp; time method)
16002     *</pre>
16003     *      The JD method is the most natural and convenient to use in
16004     *      cases where the loss of several decimal digits of resolution
16005     *      is acceptable.  The J2000 method is best matched to the way
16006     *      the argument is handled internally and will deliver the
16007     *      optimum resolution.  The MJD method and the date &amp; time methods
16008     *      are both good compromises between resolution and convenience.
16009     *
16010     * <li>  The nutation components (luni-solar + planetary, IAU 2000B) in
16011     *      longitude and obliquity are in radians and with respect to the
16012     *      equinox and ecliptic of date.  For more accurate results, but
16013     *      at the cost of increased computation, use the jauPn00a function.
16014     *      For the utmost accuracy, use the jauPn00  function, where the
16015     *      nutation components are caller-specified.
16016     *
16017     * <li>  The mean obliquity is consistent with the IAU 2000 precession.
16018     *
16019     * <li>  The matrix rb transforms vectors from GCRS to J2000.0 mean
16020     *      equator and equinox by applying frame bias.
16021     *
16022     * <li>  The matrix rp transforms vectors from J2000.0 mean equator and
16023     *      equinox to mean equator and equinox of date by applying
16024     *      precession.
16025     *
16026     * <li>  The matrix rbp transforms vectors from GCRS to mean equator and
16027     *      equinox of date by applying frame bias then precession.  It is
16028     *      the product rp x rb.
16029     *
16030     * <li>  The matrix rn transforms vectors from mean equator and equinox
16031     *      of date to true equator and equinox of date by applying the
16032     *      nutation (luni-solar + planetary).
16033     *
16034     * <li>  The matrix rbpn transforms vectors from GCRS to true equator and
16035     *      equinox of date.  It is the product rn x rbp, applying frame
16036     *      bias, precession and nutation in that order.
16037     *
16038     * <li>  The X,Y,Z coordinates of the IAU 2000B Celestial Intermediate
16039     *      Pole are elements (3,1-3) of the matrix rbpn.
16040     *
16041     * <li> It is permissible to re-use the same array in the returned
16042     *      arguments.  The arrays are filled in the stated order.
16043     *</ol>
16044     *<p>Called:<ul>
16045     *     <li>{@link #jauNut00b} nutation, IAU 2000B
16046     *     <li>{@link #jauPn00} bias/precession/nutation results, IAU 2000
16047     * </ul>
16048     *<p>Reference:
16049     *
16050     *    <p>Capitaine, N., Chapront, J., Lambert, S. and Wallace, P.,
16051     *     "Expressions for the Celestial Intermediate Pole and Celestial
16052     *     Ephemeris Origin consistent with the IAU 2000A precession-
16053     *     nutation model", Astron.Astrophys. 400, 1145-1154 (2003).
16054     *
16055     *     n.b. The celestial ephemeris origin (CEO) was renamed "celestial
16056     *          intermediate origin" (CIO) by IAU 2006 Resolution 2.
16057     *
16058     *@version 2010 January 18
16059     *
16060     *  @since Release 20101201
16061     *
16062     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
16063     */
16064     public static PrecessionNutation jauPn00b(double date1, double date2)
16065     {
16066     /* Nutation. */
16067        NutationTerms nut = jauNut00b(date1, date2);
16068 
16069     /* Remaining results. */
16070        return jauPn00(date1, date2, nut.dpsi, nut.deps);
16071 
16072 
16073         }
16074     
16075 
16076     /**
16077     *  Precession-nutation, IAU 2006 model:  a multi-purpose function,
16078     *  supporting classical (equinox-based) use directly and CIO-based use
16079     *  indirectly.
16080     *
16081     *<p>This function is derived from the International Astronomical Union's
16082     *  SOFA (Standards Of Fundamental Astronomy) software collection.
16083     *
16084     *<p>Status:  support function.
16085     *
16086     *<!-- Given: -->
16087     *     @param date1 double TT as a 2-part Julian Date (Note 1)
16088     *     @param date2 double TT as a 2-part Julian Date (Note 1)
16089     *     @param dpsi double           nutation (Note 2)
16090     *     @param deps double           nutation (Note 2) 
16091     *
16092     *<!-- Returned: -->
16093     *     @return epsa          double            <u>returned</u> mean obliquity (Note 3)
16094     *            rb            double[3][3]      <u>returned</u> frame bias matrix (Note 4)
16095     *            rp            double[3][3]      <u>returned</u> precession matrix (Note 5)
16096     *            rbp           double[3][3]      <u>returned</u> bias-precession matrix (Note 6)
16097     *            rn            double[3][3]      <u>returned</u> nutation matrix (Note 7)
16098     *            rbpn          double[3][3]      <u>returned</u> GCRS-to-true matrix (Note 8)
16099     *
16100     * <p>Notes:
16101     * <ol>
16102     *
16103     * <li>  The TT date date1+date2 is a Julian Date, apportioned in any
16104     *      convenient way between the two arguments.  For example,
16105     *      JD(TT)=2450123.7 could be expressed in any of these ways,
16106     *      among others:
16107     *<pre>
16108     *             date1          date2
16109     *
16110     *          2450123.7           0.0       (JD method)
16111     *          2451545.0       -1421.3       (J2000 method)
16112     *          2400000.5       50123.2       (MJD method)
16113     *          2450123.5           0.2       (date &amp; time method)
16114     *</pre>
16115     *      The JD method is the most natural and convenient to use in
16116     *      cases where the loss of several decimal digits of resolution
16117     *      is acceptable.  The J2000 method is best matched to the way
16118     *      the argument is handled internally and will deliver the
16119     *      optimum resolution.  The MJD method and the date &amp; time methods
16120     *      are both good compromises between resolution and convenience.
16121     *
16122     * <li>  The caller is responsible for providing the nutation components;
16123     *      they are in longitude and obliquity, in radians and are with
16124     *      respect to the equinox and ecliptic of date.  For high-accuracy
16125     *      applications, free core nutation should be included as well as
16126     *      any other relevant corrections to the position of the CIP.
16127     *
16128     * <li>  The returned mean obliquity is consistent with the IAU 2006
16129     *      precession.
16130     *
16131     * <li>  The matrix rb transforms vectors from GCRS to J2000.0 mean
16132     *      equator and equinox by applying frame bias.
16133     *
16134     * <li>  The matrix rp transforms vectors from J2000.0 mean equator and
16135     *      equinox to mean equator and equinox of date by applying
16136     *      precession.
16137     *
16138     * <li>  The matrix rbp transforms vectors from GCRS to mean equator and
16139     *      equinox of date by applying frame bias then precession.  It is
16140     *      the product rp x rb.
16141     *
16142     * <li>  The matrix rn transforms vectors from mean equator and equinox
16143     *      of date to true equator and equinox of date by applying the
16144     *      nutation (luni-solar + planetary).
16145     *
16146     * <li>  The matrix rbpn transforms vectors from GCRS to true equator and
16147     *      equinox of date.  It is the product rn x rbp, applying frame
16148     *      bias, precession and nutation in that order.
16149     *
16150     * <li>  The X,Y,Z coordinates of the IAU 2000B Celestial Intermediate
16151     *      Pole are elements (3,1-3) of the matrix rbpn.
16152     *
16153     *  <li> It is permissible to re-use the same array in the returned
16154     *      arguments.  The arrays are filled in the stated order.
16155     *</ol>
16156     *<p>Called:<ul>
16157     *     <li>{@link #jauPfw06} bias-precession F-W angles, IAU 2006
16158     *     <li>{@link #jauFw2m} F-W angles to r-matrix
16159     *     <li>{@link #jauCr} copy r-matrix
16160     *     <li>{@link #jauTr} transpose r-matrix
16161     *     <li>{@link #jauRxr} product of two r-matrices
16162     * </ul>
16163     *<p>References:
16164     *
16165     *    <p>Capitaine, N. &amp; Wallace, P.T., 2006, Astron.Astrophys. 450, 855
16166     *
16167     *    <p>Wallace, P.T. &amp; Capitaine, N., 2006, Astron.Astrophys. 459, 981
16168     *
16169     *@version 2009 December 17
16170     *
16171     *  @since Release 20101201
16172     *
16173     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
16174     */
16175     public static PrecessionNutation jauPn06(double date1, double date2, double dpsi, double deps)
16176     {
16177 
16178         double rb[][] = new double[3][3], rbp[][] = new double[3][3], rbpn[][] = new double[3][3];
16179     /* Bias-precession Fukushima-Williams angles of J2000.0 = frame bias. */
16180        FWPrecessionAngles fw = jauPfw06(DJM0, DJM00);
16181 
16182     /* B matrix. */
16183        double[][] r1 = jauFw2m(fw.gamb, fw.phib, fw.psib, fw.epsa);
16184        jauCr(r1, rb);
16185 
16186     /* Bias-precession Fukushima-Williams angles of date. */
16187        fw = jauPfw06(date1, date2);
16188 
16189     /* Bias-precession matrix. */
16190        double[][] r2 = jauFw2m(fw.gamb, fw.phib, fw.psib, fw.epsa );
16191        jauCr(r2, rbp);
16192 
16193     /* Solve for precession matrix. */
16194        double[][] rt = jauTr(r1);
16195        double[][] rp = jauRxr(r2, rt);
16196 
16197     /* Equinox-based bias-precession-nutation matrix. */
16198        r1 = jauFw2m(fw.gamb, fw.phib, fw.psib + dpsi, fw.epsa + deps);
16199        jauCr(r1, rbpn);
16200 
16201     /* Solve for nutation matrix. */
16202        rt = jauTr(r2);
16203        double[][] rn = jauRxr(r1, rt);
16204 
16205     /* Obliquity, mean of date. */
16206        double epsa = fw.epsa;
16207 
16208        return new PrecessionNutation(dpsi, deps, epsa, rb, rp, rbp, rn, rbpn);
16209 
16210         }
16211     
16212 
16213     /**
16214     *  Precession-nutation, IAU 2006/2000A models:  a multi-purpose function,
16215     *  supporting classical (equinox-based) use directly and CIO-based use
16216     *  indirectly.
16217     *
16218     *<p>This function is derived from the International Astronomical Union's
16219     *  SOFA (Standards Of Fundamental Astronomy) software collection.
16220     *
16221     *<p>Status:  support function.
16222     *
16223     *<!-- Given: -->
16224     *     @param date1 double TT as a 2-part Julian Date (Note 1)
16225     *     @param date2 double TT as a 2-part Julian Date (Note 1)
16226     *
16227     *<!-- Returned: -->
16228     *     @return dpsi,deps     double            <u>returned</u> nutation (Note 2)
16229     *            epsa          double            <u>returned</u> mean obliquity (Note 3)
16230     *            rb            double[3][3]      <u>returned</u> frame bias matrix (Note 4)
16231     *            rp            double[3][3]      <u>returned</u> precession matrix (Note 5)
16232     *            rbp           double[3][3]      <u>returned</u> bias-precession matrix (Note 6)
16233     *            rn            double[3][3]      <u>returned</u> nutation matrix (Note 7)
16234     *            rbpn          double[3][3]      <u>returned</u> GCRS-to-true matrix (Notes 8,9)
16235     *
16236     * <p>Notes:
16237     * <ol>
16238     *
16239     * <li>  The TT date date1+date2 is a Julian Date, apportioned in any
16240     *      convenient way between the two arguments.  For example,
16241     *      JD(TT)=2450123.7 could be expressed in any of these ways,
16242     *      among others:
16243     *<pre>
16244     *             date1          date2
16245     *
16246     *          2450123.7           0.0       (JD method)
16247     *          2451545.0       -1421.3       (J2000 method)
16248     *          2400000.5       50123.2       (MJD method)
16249     *          2450123.5           0.2       (date &amp; time method)
16250     *</pre>
16251     *      The JD method is the most natural and convenient to use in
16252     *      cases where the loss of several decimal digits of resolution
16253     *      is acceptable.  The J2000 method is best matched to the way
16254     *      the argument is handled internally and will deliver the
16255     *      optimum resolution.  The MJD method and the date &amp; time methods
16256     *      are both good compromises between resolution and convenience.
16257     *
16258     * <li>  The nutation components (luni-solar + planetary, IAU 2000A) in
16259     *      longitude and obliquity are in radians and with respect to the
16260     *      equinox and ecliptic of date.  Free core nutation is omitted;
16261     *      for the utmost accuracy, use the jauPn06 function, where the
16262     *      nutation components are caller-specified.
16263     *
16264     * <li>  The mean obliquity is consistent with the IAU 2006 precession.
16265     *
16266     * <li>  The matrix rb transforms vectors from GCRS to mean J2000.0 by
16267     *      applying frame bias.
16268     *
16269     * <li>  The matrix rp transforms vectors from mean J2000.0 to mean of
16270     *      date by applying precession.
16271     *
16272     * <li>  The matrix rbp transforms vectors from GCRS to mean of date by
16273     *      applying frame bias then precession.  It is the product rp x rb.
16274     *
16275     * <li>  The matrix rn transforms vectors from mean of date to true of
16276     *      date by applying the nutation (luni-solar + planetary).
16277     *
16278     * <li>  The matrix rbpn transforms vectors from GCRS to true of date
16279     *      (CIP/equinox).  It is the product rn x rbp, applying frame bias,
16280     *      precession and nutation in that order.
16281     *
16282     * <li>  The X,Y,Z coordinates of the IAU 2006/2000A Celestial
16283     *      Intermediate Pole are elements (1,1-3) of the matrix rbpn.
16284     *
16285     *  <li> It is permissible to re-use the same array in the returned
16286     *      arguments.  The arrays are filled in the stated order.
16287     *</ol>
16288     *<p>Called:<ul>
16289     *     <li>{@link #jauNut06a} nutation, IAU 2006/2000A
16290     *     <li>{@link #jauPn06} bias/precession/nutation results, IAU 2006
16291     * </ul>
16292     *<p>Reference:
16293     *
16294     *    <p>Capitaine, N. &amp; Wallace, P.T., 2006, Astron.Astrophys. 450, 855
16295     *
16296     *@version 2009 December 18
16297     *
16298     *  @since Release 20101201
16299     *
16300     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
16301     */
16302     public static PrecessionNutation jauPn06a(double date1, double date2)
16303     {
16304     /* Nutation. */
16305        NutationTerms nut = jauNut06a(date1, date2);
16306 
16307     /* Remaining results. */
16308        return jauPn06(date1, date2, nut.dpsi, nut.deps);
16309 
16310         }
16311     
16312 
16313     /**
16314     *  Form the matrix of precession-nutation for a given date (including
16315     *  frame bias), equinox-based, IAU 2000A model.
16316     *
16317     *<p>This function is derived from the International Astronomical Union's
16318     *  SOFA (Standards Of Fundamental Astronomy) software collection.
16319     *
16320     *<p>Status:  support function.
16321     *
16322     *<!-- Given: -->
16323     *     @param date1 double TT as a 2-part Julian Date (Note 1)
16324     *     @param date2 double TT as a 2-part Julian Date (Note 1)
16325     *
16326     *<!-- Returned: -->
16327     *     @return rbpn          double[3][3]      <u>returned</u> classical NPB matrix (Note 2)
16328     *
16329     * <p>Notes:
16330     * <ol>
16331     *
16332     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
16333     *     convenient way between the two arguments.  For example,
16334     *     JD(TT)=2450123.7 could be expressed in any of these ways,
16335     *     among others:
16336     *<pre>
16337     *            date1          date2
16338     *
16339     *         2450123.7           0.0       (JD method)
16340     *         2451545.0       -1421.3       (J2000 method)
16341     *         2400000.5       50123.2       (MJD method)
16342     *         2450123.5           0.2       (date &amp; time method)
16343     *</pre>
16344     *     The JD method is the most natural and convenient to use in
16345     *     cases where the loss of several decimal digits of resolution
16346     *     is acceptable.  The J2000 method is best matched to the way
16347     *     the argument is handled internally and will deliver the
16348     *     optimum resolution.  The MJD method and the date &amp; time methods
16349     *     are both good compromises between resolution and convenience.
16350     *
16351     * <li> The matrix operates in the sense V(date) = rbpn * V(GCRS), where
16352     *     the p-vector V(date) is with respect to the true equatorial triad
16353     *     of date date1+date2 and the p-vector V(GCRS) is with respect to
16354     *     the Geocentric Celestial Reference System (IAU, 2000).
16355     *
16356     * <li> A faster, but slightly less accurate result (about 1 mas), can be
16357     *     obtained by using instead the jauPnm00b function.
16358     *</ol>
16359     *<p>Called:<ul>
16360     *     <li>{@link #jauPn00a} bias/precession/nutation, IAU 2000A
16361     * </ul>
16362     *<p>Reference:
16363     *
16364     *     IAU: Trans. International Astronomical Union, Vol. XXIVB;  Proc.
16365     *     24th General Assembly, Manchester, UK.  Resolutions B1.3, B1.6.
16366     *     (2000)
16367     *
16368     *@version 2009 December 21
16369     *
16370     *  @since Release 20101201
16371     *
16372     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
16373     */
16374     public static double[][] jauPnm00a(double date1, double date2)
16375     {
16376 
16377     /* Obtain the required matrix (discarding other results). */
16378         PrecessionNutation pn = jauPn00a(date1, date2);
16379         return pn.rbpn;
16380 
16381     }
16382 
16383 
16384     /**
16385     *  Form the matrix of precession-nutation for a given date (including
16386     *  frame bias), equinox-based, IAU 2000B model.
16387     *
16388     *<p>This function is derived from the International Astronomical Union's
16389     *  SOFA (Standards Of Fundamental Astronomy) software collection.
16390     *
16391     *<p>Status:  support function.
16392     *
16393     *<!-- Given: -->
16394     *     @param date1 double TT as a 2-part Julian Date (Note 1)
16395     *     @param date2 double TT as a 2-part Julian Date (Note 1)
16396     *
16397     *<!-- Returned: -->
16398     *     @return rbpn         double[3][3]   <u>returned</u> bias-precession-nutation matrix (Note 2)
16399     *
16400     * <p>Notes:
16401     * <ol>
16402     *
16403     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
16404     *     convenient way between the two arguments.  For example,
16405     *     JD(TT)=2450123.7 could be expressed in any of these ways,
16406     *     among others:
16407     *<pre>
16408     *            date1          date2
16409     *
16410     *         2450123.7           0.0       (JD method)
16411     *         2451545.0       -1421.3       (J2000 method)
16412     *         2400000.5       50123.2       (MJD method)
16413     *         2450123.5           0.2       (date &amp; time method)
16414     *</pre>
16415     *     The JD method is the most natural and convenient to use in
16416     *     cases where the loss of several decimal digits of resolution
16417     *     is acceptable.  The J2000 method is best matched to the way
16418     *     the argument is handled internally and will deliver the
16419     *     optimum resolution.  The MJD method and the date &amp; time methods
16420     *     are both good compromises between resolution and convenience.
16421     *
16422     * <li> The matrix operates in the sense V(date) = rbpn * V(GCRS), where
16423     *     the p-vector V(date) is with respect to the true equatorial triad
16424     *     of date date1+date2 and the p-vector V(GCRS) is with respect to
16425     *     the Geocentric Celestial Reference System (IAU, 2000).
16426     *
16427     * <li> The present function is faster, but slightly less accurate (about
16428     *     1 mas), than the jauPnm00a function.
16429     *</ol>
16430     *<p>Called:<ul>
16431     *     <li>{@link #jauPn00b} bias/precession/nutation, IAU 2000B
16432     * </ul>
16433     *<p>Reference:
16434     *
16435     *     IAU: Trans. International Astronomical Union, Vol. XXIVB;  Proc.
16436     *     24th General Assembly, Manchester, UK.  Resolutions B1.3, B1.6.
16437     *     (2000)
16438     *
16439     *@version 2009 December 21
16440     *
16441     *  @since Release 20101201
16442     *
16443     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
16444     */
16445     public static double[][] jauPnm00b(double date1, double date2)
16446     {
16447 
16448     /* Obtain the required matrix (discarding other results). */
16449        PrecessionNutation pn = jauPn00b(date1, date2);
16450 
16451        return pn.rbpn;
16452 
16453         }
16454     
16455 
16456     /**
16457     *  Form the matrix of precession-nutation for a given date (including
16458     *  frame bias), IAU 2006 precession and IAU 2000A nutation models.
16459     *
16460     *<p>This function is derived from the International Astronomical Union's
16461     *  SOFA (Standards Of Fundamental Astronomy) software collection.
16462     *
16463     *<p>Status:  support function.
16464     *
16465     *<!-- Given: -->
16466     *     @param date1 double TT as a 2-part Julian Date (Note 1)
16467     *     @param date2 double TT as a 2-part Julian Date (Note 1)
16468     *
16469     *<!-- Returned: -->
16470     *     @return rnpb         double[3][3]   <u>returned</u> bias-precession-nutation matrix (Note 2)
16471     *
16472     * <p>Notes:
16473     * <ol>
16474     *
16475     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
16476     *     convenient way between the two arguments.  For example,
16477     *     JD(TT)=2450123.7 could be expressed in any of these ways,
16478     *     among others:
16479     *<pre>
16480     *            date1          date2
16481     *
16482     *         2450123.7           0.0       (JD method)
16483     *         2451545.0       -1421.3       (J2000 method)
16484     *         2400000.5       50123.2       (MJD method)
16485     *         2450123.5           0.2       (date &amp; time method)
16486     *</pre>
16487     *     The JD method is the most natural and convenient to use in
16488     *     cases where the loss of several decimal digits of resolution
16489     *     is acceptable.  The J2000 method is best matched to the way
16490     *     the argument is handled internally and will deliver the
16491     *     optimum resolution.  The MJD method and the date &amp; time methods
16492     *     are both good compromises between resolution and convenience.
16493     *
16494     * <li> The matrix operates in the sense V(date) = rnpb * V(GCRS), where
16495     *     the p-vector V(date) is with respect to the true equatorial triad
16496     *     of date date1+date2 and the p-vector V(GCRS) is with respect to
16497     *     the Geocentric Celestial Reference System (IAU, 2000).
16498     *</ol>
16499     *<p>Called:<ul>
16500     *     <li>{@link #jauPfw06} bias-precession F-W angles, IAU 2006
16501     *     <li>{@link #jauNut06a} nutation, IAU 2006/2000A
16502     *     <li>{@link #jauFw2m} F-W angles to r-matrix
16503     * </ul>
16504     *<p>Reference:
16505     *
16506     *    <p>Capitaine, N. &amp; Wallace, P.T., 2006, Astron.Astrophys. 450, 855.
16507     *
16508     *@version 2009 December 21
16509     *
16510     *  @since Release 20101201
16511     *
16512     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
16513     */
16514     public static double[][] jauPnm06a(double date1, double date2)
16515     {
16516 
16517     /* Fukushima-Williams angles for frame bias and precession. */
16518        FWPrecessionAngles fw = jauPfw06(date1, date2);
16519 
16520     /* Nutation components. */
16521        NutationTerms nut = jauNut06a(date1, date2);
16522 
16523     /* Equinox based nutation x precession x bias matrix. */
16524        double[][] rnpb = jauFw2m(fw.gamb, fw.phib, fw.psib + nut.dpsi, fw.epsa + nut.deps);
16525 
16526        return rnpb;
16527 
16528         }
16529     
16530 
16531     /**
16532     *  Form the matrix of precession/nutation for a given date, IAU 1976
16533     *  precession model, IAU 1980 nutation model.
16534     *
16535     *<p>This function is derived from the International Astronomical Union's
16536     *  SOFA (Standards Of Fundamental Astronomy) software collection.
16537     *
16538     *<p>Status:  support function.
16539     *
16540     *<!-- Given: -->
16541     *     @param date1 double          TDB date (Note 1)
16542     *     @param date2 double          TDB date (Note 1) 
16543     *
16544     *<!-- Returned: -->
16545     *     @return rmatpn          double[3][3]     <u>returned</u> combined precession/nutation matrix
16546     *
16547     * <p>Notes:
16548     * <ol>
16549     *
16550     * <li> The TDB date date1+date2 is a Julian Date, apportioned in any
16551     *     convenient way between the two arguments.  For example,
16552     *     JD(TDB)=2450123.7 could be expressed in any of these ways,
16553     *     among others:
16554     *<pre>
16555     *            date1          date2
16556     *
16557     *         2450123.7           0.0       (JD method)
16558     *         2451545.0       -1421.3       (J2000 method)
16559     *         2400000.5       50123.2       (MJD method)
16560     *         2450123.5           0.2       (date &amp; time method)
16561     *</pre>
16562     *     The JD method is the most natural and convenient to use in
16563     *     cases where the loss of several decimal digits of resolution
16564     *     is acceptable.  The J2000 method is best matched to the way
16565     *     the argument is handled internally and will deliver the
16566     *     optimum resolution.  The MJD method and the date &amp; time methods
16567     *     are both good compromises between resolution and convenience.
16568     *
16569     * <li> The matrix operates in the sense V(date) = rmatpn * V(J2000),
16570     *     where the p-vector V(date) is with respect to the true equatorial
16571     *     triad of date date1+date2 and the p-vector V(J2000) is with
16572     *     respect to the mean equatorial triad of epoch J2000.0.
16573     *</ol>
16574     *<p>Called:<ul>
16575     *     <li>{@link #jauPmat76} precession matrix, IAU 1976
16576     *     <li>{@link #jauNutm80} nutation matrix, IAU 1980
16577     *     <li>{@link #jauRxr} product of two r-matrices
16578     * </ul>
16579     *<p>Reference:
16580     *
16581     *     <p>Explanatory Supplement to the Astronomical Almanac,
16582     *     P. Kenneth Seidelmann (ed), University Science Books (1992),
16583     *     Section 3.3 (p145).
16584     *
16585     *@version 2010 January 23
16586     *
16587     *  @since Release 20101201
16588     *
16589     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
16590     */
16591     public static double[][] jauPnm80(double date1, double date2)
16592     {
16593        double rmatp[][] = new double[3][3], rmatn[][] = new double[3][3];
16594 
16595 
16596     /* Precession matrix, J2000.0 to date. */
16597        rmatp = jauPmat76(date1, date2 );
16598 
16599     /* Nutation matrix. */
16600        rmatn = jauNutm80(date1, date2);
16601 
16602     /* Combine the matrices:  PN = N x P. */
16603        double[][] rmatpn = jauRxr(rmatn, rmatp);
16604 
16605        return rmatpn;
16606 
16607         }
16608     
16609 
16610     /**
16611     *  Form the matrix of polar motion for a given date, IAU 2000.
16612     *
16613     *<p>This function is derived from the International Astronomical Union's
16614     *  SOFA (Standards Of Fundamental Astronomy) software collection.
16615     *
16616     *<p>Status:  support function.
16617     *
16618     *<!-- Given: -->
16619     *     @param xp double     coordinates of the pole (radians, Note 1)
16620     *     @param yp double     coordinates of the pole (radians, Note 1) 
16621     *     @param sp        double     the TIO locator s' (radians, Note 2)
16622     *
16623     *<!-- Returned: -->
16624     *     @return     double[3][3]     <u>returned</u> polar-motion matrix (Note 3)
16625     *
16626     * <p>Notes:
16627     * <ol>
16628     *
16629     * <li> The arguments xp and yp are the coordinates (in radians) of the
16630     *     Celestial Intermediate Pole with respect to the International
16631     *     Terrestrial Reference System (see IERS Conventions 2003),
16632     *     measured along the meridians to 0 and 90 deg west respectively.
16633     *
16634     * <li> The argument sp is the TIO locator s', in radians, which
16635     *     positions the Terrestrial Intermediate Origin on the equator.  It
16636     *     is obtained from polar motion observations by numerical
16637     *     integration, and so is in essence unpredictable.  However, it is
16638     *     dominated by a secular drift of about 47 microarcseconds per
16639     *     century, and so can be taken into account by using s' = -47*t,
16640     *     where t is centuries since J2000.0.  The function jauSp00
16641     *     implements this approximation.
16642     *
16643     * <li> The matrix operates in the sense V(TRS) = rpom * V(CIP), meaning
16644     *     that it is the final rotation when computing the pointing
16645     *     direction to a celestial source.
16646     *</ol>
16647     *<p>Called:<ul>
16648     *     <li>{@link #jauIr} initialize r-matrix to identity
16649     *     <li>{@link #jauRz} rotate around Z-axis
16650     *     <li>{@link #jauRy} rotate around Y-axis
16651     *     <li>{@link #jauRx} rotate around X-axis
16652     * </ul>
16653     *<p>Reference:
16654     *
16655     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
16656     *     IERS Technical Note No. 32, BKG (2004)
16657     *
16658     *@version 2009 December 17
16659     *
16660     *  @since Release 20101201
16661     *
16662     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
16663     */
16664     public static double[][] jauPom00(double xp, double yp, double sp)
16665     {
16666 
16667     /* Construct the matrix. */
16668        double rpom[][] = new double[3][3];
16669        jauIr(rpom);
16670        jauRz(sp, rpom);
16671        jauRy(-xp, rpom);
16672        jauRx(-yp, rpom);
16673 
16674        return rpom;
16675 
16676         }
16677     
16678 
16679     /**
16680     *  P-vector addition.
16681     *
16682     *<p>This function is derived from the International Astronomical Union's
16683     *  SOFA (Standards Of Fundamental Astronomy) software collection.
16684     *
16685     *<p>Status:  vector/matrix support function.
16686     *
16687     *<!-- Given: -->
16688     *     @param a         double[3]       first p-vector
16689     *     @param b         double[3]       second p-vector
16690     *
16691     *<!-- Returned: -->
16692     *     @return apb       double[3]        <u>returned</u> a + b
16693     *
16694     *  Note:
16695     *     It is permissible to re-use the same array for any of the
16696     *     arguments.
16697     *
16698     *@version 2008 November 18
16699     *
16700     *  @since Release 20101201
16701     *
16702     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
16703     */
16704     public static double[] jauPpp(double a[] , double b[] )
16705     {
16706        double apb[] = new double[3]; 
16707        apb[0] = a[0] + b[0];
16708        apb[1] = a[1] + b[1];
16709        apb[2] = a[2] + b[2];
16710 
16711        return apb;
16712 
16713      }
16714     
16715 
16716     /**
16717     *  P-vector plus scaled p-vector.
16718     *
16719     *<p>This function is derived from the International Astronomical Union's
16720     *  SOFA (Standards Of Fundamental Astronomy) software collection.
16721     *
16722     *<p>Status:  vector/matrix support function.
16723     *
16724     *<!-- Given: -->
16725     *     @param a       double[3]      first p-vector
16726     *     @param s       double         scalar (multiplier for b)
16727     *     @param b       double[3]      second p-vector
16728     *
16729     *<!-- Returned: -->
16730     *     @return apsb    double[3]       <u>returned</u> a + s*b
16731     *
16732     *  Note:
16733     *     It is permissible for any of a, b and apsb to be the same array.
16734     *
16735     *<p>Called:<ul>
16736     *     <li>{@link #jauSxp} multiply p-vector by scalar
16737     *     <li>{@link #jauPpp} p-vector plus p-vector
16738     * </ul>
16739     *@version 2008 November 18
16740     *
16741     *  @since Release 20101201
16742     *
16743     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
16744     */
16745     static double[] jauPpsp(double a[] , double s, double b[]  )
16746     {
16747        double sb[] = new double[3], apsb[];
16748 
16749 
16750     /* s*b. */
16751        sb = jauSxp(s,b);
16752 
16753     /* a + s*b. */
16754        apsb = jauPpp(a, sb);
16755 
16756        return apsb;
16757 
16758         }
16759     
16760     /**
16761      * Precession correction terms.
16762      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
16763      * 
16764      * @since AIDA Stage 1
16765      */
16766     public static class PrecessionDeltaTerms {
16767         /**  precession correction in longitude  */
16768         public double dpsipr;
16769         /**  precession correction in obliquity */
16770         public double depspr;
16771         public PrecessionDeltaTerms(double dpsipr, double depspr) {
16772             this.dpsipr = dpsipr;
16773             this.depspr = depspr;
16774         }
16775     }
16776 
16777     /**
16778     *  Precession-rate part of the IAU 2000 precession-nutation models
16779     *  (part of MHB2000).
16780     *
16781     *<p>This function is derived from the International Astronomical Union's
16782     *  SOFA (Standards Of Fundamental Astronomy) software collection.
16783     *
16784     *<p>Status:  canonical model.
16785     *
16786     *<!-- Given: -->
16787     *     @param date1 double TT as a 2-part Julian Date (Note 1)
16788     *     @param date2 double TT as a 2-part Julian Date (Note 1)
16789     *
16790     *<!-- Returned: -->
16791     *     @param dpsipr double    <u>returned</u> precession corrections (Notes 2,3)
16792     *     @param depspr double    <u>returned</u> precession corrections (Notes 2,3) 
16793     *
16794     * <p>Notes:
16795     * <ol>
16796     *
16797     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
16798     *     convenient way between the two arguments.  For example,
16799     *     JD(TT)=2450123.7 could be expressed in any of these ways,
16800     *     among others:
16801     *<pre>
16802     *            date1          date2
16803     *
16804     *         2450123.7           0.0       (JD method)
16805     *         2451545.0       -1421.3       (J2000 method)
16806     *         2400000.5       50123.2       (MJD method)
16807     *         2450123.5           0.2       (date &amp; time method)
16808     *</pre>
16809     *     The JD method is the most natural and convenient to use in
16810     *     cases where the loss of several decimal digits of resolution
16811     *     is acceptable.  The J2000 method is best matched to the way
16812     *     the argument is handled internally and will deliver the
16813     *     optimum resolution.  The MJD method and the date &amp; time methods
16814     *     are both good compromises between resolution and convenience.
16815     *
16816     * <li> The precession adjustments are expressed as "nutation
16817     *     components", corrections in longitude and obliquity with respect
16818     *     to the J2000.0 equinox and ecliptic.
16819     *
16820     * <li> Although the precession adjustments are stated to be with respect
16821     *     to Lieske et al. (1977), the MHB2000 model does not specify which
16822     *     set of Euler angles are to be used and how the adjustments are to
16823     *     be applied.  The most literal and straightforward procedure is to
16824     *     adopt the 4-rotation epsilon_0, psi_A, omega_A, xi_A option, and
16825     *     to add dpsipr to psi_A and depspr to both omega_A and eps_A.
16826     *
16827     * <li> This is an implementation of one aspect of the IAU 2000A nutation
16828     *     model, formally adopted by the IAU General Assembly in 2000,
16829     *     namely MHB2000 (Mathews et al. 2002).
16830     *
16831     *<p>References:
16832     *
16833     *     <p>Lieske, J.H., Lederle, T., Fricke, W. &amp; Morando, B., "Expressions
16834     *     for the precession quantities based upon the IAU (1976) System of
16835     *     Astronomical Constants", Astron.Astrophys., 58, 1-16 (1977)
16836     *
16837     *     <p>Mathews, P.M., Herring, T.A., Buffet, B.A., "Modeling of nutation
16838     *     and precession   New nutation series for nonrigid Earth and
16839     *     insights into the Earth's interior", J.Geophys.Res., 107, B4,
16840     *     2002.  The MHB2000 code itself was obtained on 9th September 2002
16841     *     from ftp://maia.usno.navy.mil/conv2000/chapter5/IAU2000A.
16842     *
16843     *    <p>Wallace, P.T., "Software for Implementing the IAU 2000
16844     *     Resolutions", in IERS Workshop 5.1 (2002).
16845     *
16846     *@version 2009 December 17
16847     *
16848     *  @since Release 20101201
16849     *
16850     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
16851     */
16852     static PrecessionDeltaTerms jauPr00(double date1, double date2)
16853     {
16854        double t;
16855 
16856     /* Precession and obliquity corrections (radians per century) */
16857        final double PRECOR = -0.29965 * DAS2R,
16858                            OBLCOR = -0.02524 * DAS2R;
16859 
16860 
16861     /* Interval between fundamental epoch J2000.0 and given date (JC). */
16862        t = ((date1 - DJ00) + date2) / DJC;
16863 
16864     /* Precession rate contributions with respect to IAU 1976/80. */
16865        double dpsipr = PRECOR * t;
16866        double depspr = OBLCOR * t;
16867 
16868        return new PrecessionDeltaTerms(dpsipr, depspr);
16869 
16870         }
16871     
16872     /**
16873      * Euler Angles.
16874      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
16875      * 
16876      * @since AIDA Stage 1
16877      */
16878     public static class EulerAngles {
16879         /** 1st rotation: radians cw around z */
16880         public double zeta;
16881         /** 3rd rotation: radians cw around z */
16882         public double z;
16883         /** 2nd rotation: radians ccw around y */
16884         public double theta;
16885         public EulerAngles(double zeta, double z, double theta){
16886             this.zeta = zeta;
16887             this.z = z;
16888             this.theta = theta;
16889         }
16890     }
16891                    
16892     /**
16893     *  IAU 1976 precession model.
16894     *
16895     *  This function forms the three Euler angles which implement general
16896     *  precession between two epochs, using the IAU 1976 model (as for
16897     *  the FK5 catalog).
16898     *
16899     *<p>This function is derived from the International Astronomical Union's
16900     *  SOFA (Standards Of Fundamental Astronomy) software collection.
16901     *
16902     *<p>Status:  canonical model.
16903     *
16904     *<!-- Given: -->
16905     *     @param ep01 double     TDB starting epoch (Note 1)
16906     *     @param ep02 double     TDB starting epoch (Note 1) 
16907     *     @param ep11 double     TDB ending epoch (Note 1)
16908     *     @param ep12 double     TDB ending epoch (Note 1) 
16909     *
16910     *<!-- Returned: -->
16911     *     @param zeta         double      <u>returned</u> 1st rotation: radians cw around z
16912     *     @param z            double      <u>returned</u> 3rd rotation: radians cw around z
16913     *     @param theta        double      <u>returned</u> 2nd rotation: radians ccw around y
16914     *
16915     * <p>Notes:
16916     * <ol>
16917     *
16918     * <li> The epochs ep01+ep02 and ep11+ep12 are Julian Dates, apportioned
16919     *     in any convenient way between the arguments epn1 and epn2.  For
16920     *     example, JD(TDB)=2450123.7 could be expressed in any of these
16921     *     ways, among others:
16922     *
16923     *             epn1          epn2
16924     *
16925     *         2450123.7           0.0       (JD method)
16926     *         2451545.0       -1421.3       (J2000 method)
16927     *         2400000.5       50123.2       (MJD method)
16928     *         2450123.5           0.2       (date &amp; time method)
16929     *</pre>
16930     *     The JD method is the most natural and convenient to use in cases
16931     *     where the loss of several decimal digits of resolution is
16932     *     acceptable.  The J2000 method is best matched to the way the
16933     *     argument is handled internally and will deliver the optimum
16934     *     optimum resolution.  The MJD method and the date &amp; time methods
16935     *     are both good compromises between resolution and convenience.
16936     *     The two epochs may be expressed using different methods, but at
16937     *     the risk of losing some resolution.
16938     *
16939     * <li> The accumulated precession angles zeta, z, theta are expressed
16940     *     through canonical polynomials which are valid only for a limited
16941     *     time span.  In addition, the IAU 1976 precession rate is known to
16942     *     be imperfect.  The absolute accuracy of the present formulation
16943     *     is better than 0.1 arcsec from 1960AD to 2040AD, better than
16944     *     1 arcsec from 1640AD to 2360AD, and remains below 3 arcsec for
16945     *     the whole of the period 500BC to 3000AD.  The errors exceed
16946     *     10 arcsec outside the range 1200BC to 3900AD, exceed 100 arcsec
16947     *     outside 4200BC to 5600AD and exceed 1000 arcsec outside 6800BC to
16948     *     8200AD.
16949     *
16950     * <li> The three angles are returned in the conventional order, which
16951     *     is not the same as the order of the corresponding Euler
16952     *     rotations.  The precession matrix is
16953     *     R_3(-z) x R_2(+theta) x R_3(-zeta).
16954     *
16955     *<p>Reference:
16956     *
16957     *     <p>Lieske, J.H., 1979, Astron.Astrophys. 73, 282, equations
16958     *     (6) &amp; (7), p283.
16959     *
16960     *@version 2009 December 17
16961     *
16962     *  @since Release 20101201
16963     *
16964     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
16965     */
16966     static EulerAngles jauPrec76(double ep01, double ep02, double ep11, double ep12)
16967     {
16968        double t0, t, tas2r, w;
16969 
16970 
16971     /* Interval between fundamental epoch J2000.0 and start epoch (JC). */
16972        t0 = ((ep01 - DJ00) + ep02) / DJC;
16973 
16974     /* Interval over which precession required (JC). */
16975        t = ((ep11 - ep01) + (ep12 - ep02)) / DJC;
16976 
16977     /* Euler angles. */
16978        tas2r = t * DAS2R;
16979        w = 2306.2181 + (1.39656 - 0.000139 * t0) * t0;
16980 
16981        double zeta = (w + ((0.30188 - 0.000344 * t0) + 0.017998 * t) * t) * tas2r;
16982 
16983        double z = (w + ((1.09468 + 0.000066 * t0) + 0.018203 * t) * t) * tas2r;
16984 
16985        double theta = ((2004.3109 + (-0.85330 - 0.000217 * t0) * t0)
16986               + ((-0.42665 - 0.000217 * t0) - 0.041833 * t) * t) * tas2r;
16987 
16988        return new EulerAngles(zeta, z, theta);
16989 
16990         }
16991     
16992 
16993     /**
16994     *  Discard velocity component of a pv-vector.
16995     *
16996     *<p>This function is derived from the International Astronomical Union's
16997     *  SOFA (Standards Of Fundamental Astronomy) software collection.
16998     *
16999     *<p>Status:  vector/matrix support function.
17000     *
17001     *<!-- Given: -->
17002     *     @param pv       double[2][3]      pv-vector
17003     *
17004     *<!-- Returned: -->
17005     *     @return p        double[3]          <u>returned</u> p-vector
17006     *
17007     *<p>Called:<ul>
17008     *     <li>{@link #jauCp} copy p-vector
17009     * </ul>
17010     *@version 2008 May 11
17011     *
17012     *  @since Release 20101201
17013     *
17014     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17015     */
17016     public static double[] jauPv2p(double pv[][] )
17017     {
17018        double p[] = new double[3];
17019        jauCp(pv[0], p);
17020 
17021        return p;
17022 
17023         }
17024     
17025 
17026     /**
17027      * A position and velocity expressed in spherical polar coordinates.
17028      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
17029      * 
17030      * @since AIDA Stage 1
17031      */
17032     public static class SphericalPositionVelocity {
17033         public SphericalPosition pos;
17034         public SphericalPosition vel;
17035         public SphericalPositionVelocity( double theta, double phi, double r,
17036                 double td, double pd, double rd) {
17037             pos = new SphericalPosition(theta, phi, r);
17038             vel = new SphericalPosition(td,pd,rd);
17039         }
17040     }
17041     /**
17042     *  Convert position/velocity from Cartesian to spherical coordinates.
17043     *
17044     *<p>This function is derived from the International Astronomical Union's
17045     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17046     *
17047     *<p>Status:  vector/matrix support function.
17048     *
17049     *<!-- Given: -->
17050     *     @param pv        double[2][3]   pv-vector
17051     *
17052     *<!-- Returned: -->
17053     *     @return theta     double          <u>returned</u> longitude angle (radians)
17054     *             phi       double          <u>returned</u> latitude angle (radians)
17055     *             r         double          <u>returned</u> radial distance
17056     *             td        double          <u>returned</u> rate of change of theta
17057     *             pd        double          <u>returned</u> rate of change of phi
17058     *             rd        double          <u>returned</u> rate of change of r
17059     *
17060     * <p>Notes:
17061     * <ol>
17062     *
17063     * <li> If the position part of pv is null, theta, phi, td and pd
17064     *     are indeterminate.  This is handled by extrapolating the
17065     *     position through unit time by using the velocity part of
17066     *     pv.  This moves the origin without changing the direction
17067     *     of the velocity component.  If the position and velocity
17068     *     components of pv are both null, zeroes are returned for all
17069     *     six results.
17070     *
17071     * <li> If the position is a pole, theta, td and pd are indeterminate.
17072     *     In such cases zeroes are returned for all three.
17073     *</ol>
17074     *@version 2008 October 28
17075     *
17076     *  @since Release 20101201
17077     *
17078     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17079     */
17080     public static SphericalPositionVelocity jauPv2s(double pv[][])
17081     {
17082        double x, y, z, xd, yd, zd, rxy2, rxy, r2, rtrue, rw, xyp;
17083        double theta, phi, r, td, pd, rd;
17084 
17085     /* Components of position/velocity vector. */
17086        x  = pv[0][0];
17087        y  = pv[0][1];
17088        z  = pv[0][2];
17089        xd = pv[1][0];
17090        yd = pv[1][1];
17091        zd = pv[1][2];
17092 
17093     /* Component of r in XY plane squared. */
17094        rxy2 = x*x + y*y;
17095 
17096     /* Modulus squared. */
17097        r2 = rxy2 + z*z;
17098 
17099     /* Modulus. */
17100        rtrue = sqrt(r2);
17101 
17102     /* If null vector, move the origin along the direction of movement. */
17103        rw = rtrue;
17104        if (rtrue == 0.0) {
17105            x = xd;
17106            y = yd;
17107            z = zd;
17108            rxy2 = x*x + y*y;
17109            r2 = rxy2 + z*z;
17110            rw = sqrt(r2);
17111        }
17112 
17113     /* Position and velocity in spherical coordinates. */
17114        rxy = sqrt(rxy2);
17115        xyp = x*xd + y*yd;
17116        if (rxy2 != 0.0) {
17117            theta = atan2(y, x);
17118            phi = atan2(z, rxy);
17119            td = (x*yd - y*xd) / rxy2;
17120            pd = (zd*rxy2 - z*xyp) / (r2*rxy);
17121        } else {
17122            theta = 0.0;
17123            phi = (z != 0.0) ? atan2(z, rxy) : 0.0;
17124            td = 0.0;
17125            pd = 0.0;
17126        }
17127        r = rtrue;
17128        rd = (rw != 0.0) ? (xyp + z*zd) / rw : 0.0;
17129 
17130        return new SphericalPositionVelocity(theta, phi, r, td, pd, rd);
17131 
17132         }
17133     
17134 
17135     /**
17136     *  Inner (=scalar=dot) product of two pv-vectors.
17137     *
17138     *<p>This function is derived from the International Astronomical Union's
17139     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17140     *
17141     *<p>Status:  vector/matrix support function.
17142     *
17143     *<!-- Given: -->
17144     *     @param a         double[2][3]       first pv-vector
17145     *     @param b         double[2][3]       second pv-vector
17146     *
17147     *<!-- Returned: -->
17148     *     @return adb       double[2]           <u>returned</u> a . b (see note)
17149     *
17150     *  Note:
17151     *
17152     *     If the position and velocity components of the two pv-vectors are
17153     *     ( ap, av ) and ( bp, bv ), the result, a . b, is the pair of
17154     *     numbers ( ap . bp , ap . bv + av . bp ).  The two numbers are the
17155     *     dot-product of the two p-vectors and its derivative.
17156     *
17157     *<p>Called:<ul>
17158     *     <li>{@link #jauPdp} scalar product of two p-vectors
17159     * </ul>
17160     *@version 2008 May 22
17161     *
17162     *  @since Release 20101201
17163     *
17164     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17165     */
17166     public static double[] jauPvdpv(double a[][], double b[][] )
17167     {
17168        double adbd, addb, adb[] = new double[2];
17169 
17170 
17171     /* a . b = constant part of result. */
17172        adb[0] = jauPdp(a[0], b[0]);
17173 
17174     /* a . bdot */
17175        adbd = jauPdp(a[0], b[1]);
17176 
17177     /* adot . b */
17178        addb = jauPdp(a[1], b[0]);
17179 
17180     /* Velocity part of result. */
17181        adb[1] = adbd + addb;
17182 
17183        return adb;
17184 
17185         }
17186     
17187 
17188     /**
17189      * Modulus of pv-vector.
17190      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
17191      * 
17192      * @since AIDA Stage 1
17193      */
17194     public static class PVModulus{
17195         public double r;
17196         public double s;
17197         public PVModulus( double r, double s){
17198             this.r = r;
17199             this.s = s;
17200         }
17201     }
17202     /**
17203     *  Modulus of pv-vector.
17204     *
17205     *<p>This function is derived from the International Astronomical Union's
17206     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17207     *
17208     *<p>Status:  vector/matrix support function.
17209     *
17210     *<!-- Given: -->
17211     *     @param pv      double[2][3]    pv-vector
17212     *
17213     *<!-- Returned: -->
17214     *     @return           modulus of position component,
17215     *                      modulus of velocity component
17216     *
17217     *<p>Called:<ul>
17218     *     <li>{@link #jauPm} modulus of p-vector
17219     * </ul>
17220     *@version 2008 May 22
17221     *
17222     *  @since Release 20101201
17223     *
17224     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17225     */
17226     public static PVModulus jauPvm(double pv[][])
17227     {
17228     /* Distance. */
17229        double r = jauPm(pv[0]);
17230 
17231     /* Speed. */
17232        double s = jauPm(pv[1]);
17233 
17234        return new PVModulus(r, s);
17235 
17236         }
17237     
17238 
17239     /**
17240     *  Subtract one pv-vector from another.
17241     *
17242     *<p>This function is derived from the International Astronomical Union's
17243     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17244     *
17245     *<p>Status:  vector/matrix support function.
17246     *
17247     *<!-- Given: -->
17248     *     @param a        double[2][3]       first pv-vector
17249     *     @param b        double[2][3]       second pv-vector
17250     *
17251     *<!-- Returned: -->
17252     *     @return      double[2][3]        <u>returned</u> a - b
17253     *
17254     *  Note:
17255     *     It is permissible to re-use the same array for any of the
17256     *     arguments.
17257     *
17258     *<p>Called:<ul>
17259     *     <li>{@link #jauPmp} p-vector minus p-vector
17260     * </ul>
17261     *@version 2008 November 18
17262     *
17263     *  @since Release 20101201
17264     *
17265     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17266     */
17267     public static double[][] jauPvmpv(double a[][], double b[][])
17268     {
17269        double amb[][] = new double[2][3];
17270        amb[0] = jauPmp(a[0], b[0]);
17271        amb[1] = jauPmp(a[1], b[1]);
17272 
17273        return amb;
17274 
17275         }
17276     
17277 
17278     /**
17279     *  Add one pv-vector to another.
17280     *
17281     *<p>This function is derived from the International Astronomical Union's
17282     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17283     *
17284     *<p>Status:  vector/matrix support function.
17285     *
17286     *<!-- Given: -->
17287     *     @param a         double[2][3]       first pv-vector
17288     *     @param b         double[2][3]       second pv-vector
17289     *
17290     *<!-- Returned: -->
17291     *     @return apb       double[2][3]        <u>returned</u> a + b
17292     *
17293     *  Note:
17294     *     It is permissible to re-use the same array for any of the
17295     *     arguments.
17296     *
17297     *<p>Called:<ul>
17298     *     <li>{@link #jauPpp} p-vector plus p-vector
17299     * </ul>
17300     *@version 2008 November 18
17301     *
17302     *  @since Release 20101201
17303     *
17304     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17305     */
17306     public static double[][] jauPvppv(double a[][], double b[][])
17307     {
17308        double apb[][] = new double[2][3];
17309        apb[0] = jauPpp(a[0], b[0]);
17310        apb[1] = jauPpp(a[1], b[1]);
17311 
17312        return apb;
17313 
17314         }
17315     
17316 
17317     /**
17318      * Typical catalogue coordinates. i.e. Position, proper motion, parallax and radial velocity.
17319      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
17320      * 
17321      * @since AIDA Stage 1
17322      */
17323     public static class CatalogCoords {
17324         /** position (radians) */
17325         public SphericalCoordinate pos;
17326         /** proper motion (radians/year)*/
17327         public SphericalCoordinate pm;
17328         /** parallax (arcsec) */
17329         public double px;
17330         /** radial velocity (km/s, positive = receding) */
17331         public double rv;
17332         
17333         public CatalogCoords(double ra, double dec,
17334                 double pmr, double pmd, double px, double rv) {
17335             this.pos = new SphericalCoordinate(ra, dec);
17336             this.pm = new SphericalCoordinate(pmr, pmd);
17337             this.px = px;
17338             this.rv = rv;
17339         }
17340     }
17341     /**
17342     *  Convert star position+velocity vector to catalog coordinates.
17343     *
17344     *<p>This function is derived from the International Astronomical Union's
17345     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17346     *
17347     *<p>Status:  support function.
17348     *
17349     *  Given (Note 1):
17350     *     pv     double[2][3]   pv-vector (AU, AU/day)
17351     *
17352     *  Returned (Note 2):
17353     *     ra     double         right ascension (radians)
17354     *     dec    double         declination (radians)
17355     *     pmr    double         RA proper motion (radians/year)
17356     *     pmd    double         Dec proper motion (radians/year)
17357     *     px     double         parallax (arcsec)
17358     *     rv     double         radial velocity (km/s, positive = receding)
17359     *
17360     * <!-- Returned (function value): -->
17361     *  @return int            status:
17362     *                              0 = OK
17363     *                             -1 = superluminal speed (Note 5)
17364     *                             -2 = null position vector
17365     *
17366     * <p>Notes:
17367     * <ol>
17368     *
17369     * <li> The specified pv-vector is the coordinate direction (and its rate
17370     *     of change) for the date at which the light leaving the star
17371     *     reached the solar-system barycenter.
17372     *
17373     * <li> The star data returned by this function are "observables" for an
17374     *     imaginary observer at the solar-system barycenter.  Proper motion
17375     *     and radial velocity are, strictly, in terms of barycentric
17376     *     coordinate time, TCB.  For most practical applications, it is
17377     *     permissible to neglect the distinction between TCB and ordinary
17378     *     "proper" time on Earth (TT/TAI).  The result will, as a rule, be
17379     *     limited by the intrinsic accuracy of the proper-motion and
17380     *     radial-velocity data;  moreover, the supplied pv-vector is likely
17381     *     to be merely an intermediate result (for example generated by the
17382     *     function jauStarpv), so that a change of time unit will cancel
17383     *     out overall.
17384     *
17385     *     In accordance with normal star-catalog conventions, the object's
17386     *     right ascension and declination are freed from the effects of
17387     *     secular aberration.  The frame, which is aligned to the catalog
17388     *     equator and equinox, is Lorentzian and centered on the SSB.
17389     *
17390     *     Summarizing, the specified pv-vector is for most stars almost
17391     *     identical to the result of applying the standard geometrical
17392     *     "space motion" transformation to the catalog data.  The
17393     *     differences, which are the subject of the Stumpff paper cited
17394     *     below, are:
17395     *
17396     *     (i) In stars with significant radial velocity and proper motion,
17397     *     the constantly changing light-time distorts the apparent proper
17398     *     motion.  Note that this is a classical, not a relativistic,
17399     *     effect.
17400     *
17401     *     (ii) The transformation complies with special relativity.
17402     *
17403     * <li> Care is needed with units.  The star coordinates are in radians
17404     *     and the proper motions in radians per Julian year, but the
17405     *     parallax is in arcseconds; the radial velocity is in km/s, but
17406     *     the pv-vector result is in AU and AU/day.
17407     *
17408     * <li> The proper motions are the rate of change of the right ascension
17409     *     and declination at the catalog epoch and are in radians per Julian
17410     *     year.  The RA proper motion is in terms of coordinate angle, not
17411     *     true angle, and will thus be numerically larger at high
17412     *     declinations.
17413     *
17414     * <li> Straight-line motion at constant speed in the inertial frame is
17415     *     assumed.  If the speed is greater than or equal to the speed of
17416     *     light, the function aborts with an error status.
17417     *
17418     * <li> The inverse transformation is performed by the function jauStarpv.
17419     *</ol>
17420     *<p>Called:<ul>
17421     *     <li>{@link #jauPn} decompose p-vector into modulus and direction
17422     *     <li>{@link #jauPdp} scalar product of two p-vectors
17423     *     <li>{@link #jauSxp} multiply p-vector by scalar
17424     *     <li>{@link #jauPmp} p-vector minus p-vector
17425     *     <li>{@link #jauPm} modulus of p-vector
17426     *     <li>{@link #jauPpp} p-vector plus p-vector
17427     *     <li>{@link #jauPv2s} pv-vector to spherical
17428     *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
17429     * </ul>
17430     *<p>Reference:
17431     *
17432     *     Stumpff, P., 1985, Astron.Astrophys. 144, 232-240.
17433     *
17434     *@version 2008 May 18
17435     *
17436     *  @since Release 20101201
17437     *
17438     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17439     */
17440     public static CatalogCoords jauPvstar(double pv[][]) throws JSOFAInternalError
17441     {
17442        double x[] = new double[3], vr, ur[] = new double[3], vt, ut[] = new double[3], bett, betr, d, w, del,
17443               usr[] = new double[3], ust[] = new double[3];
17444 
17445 
17446     /* Isolate the radial component of the velocity (AU/day, inertial). */
17447        NormalizedVector nv = jauPn(pv[0]);
17448        x = nv.u;
17449        vr = jauPdp(x, pv[1]);
17450        ur = jauSxp(vr,x);
17451 
17452     /* Isolate the transverse component of the velocity (AU/day, inertial). */
17453        ut = jauPmp(pv[1], ur);
17454        vt = jauPm(ut);
17455 
17456     /* Special-relativity dimensionless parameters. */
17457        bett = vt / DC;
17458        betr = vr / DC;
17459 
17460     /* The inertial-to-observed correction terms. */
17461        d = 1.0 + betr;
17462        w = 1.0 - betr*betr - bett*bett;
17463        if (d == 0.0 || w < 0) throw new JSOFAInternalError("Superluminal speed", -1);
17464        del = sqrt(w) - 1.0;
17465 
17466     /* Apply relativistic correction factor to radial velocity component. */
17467        w = (betr != 0) ? (betr - del) / (betr * d) : 1.0;
17468        usr = jauSxp(w,ur);
17469 
17470     /* Apply relativistic correction factor to tangential velocity */
17471     /* component.                                                  */
17472        ust = jauSxp(1.0/d, ut);
17473 
17474     /* Combine the two to obtain the observed velocity vector (AU/day). */
17475        pv[1] = jauPpp(usr, ust);
17476 
17477     /* Cartesian to spherical. */
17478        SphericalPositionVelocity pvs = jauPv2s(pv);
17479        if (pvs.pos.r == 0.0) throw new JSOFAInternalError("null position vector", -2);
17480 
17481     /* Return RA in range 0 to 2pi. */
17482        double ra = jauAnp(pvs.pos.theta);
17483 
17484     /* Return proper motions in radians per year. */
17485        double pmr = pvs.vel.theta * DJY;
17486        double pmd = pvs.vel.phi * DJY;
17487 
17488     /* Return parallax in arcsec. */
17489        double px = DR2AS / pvs.pos.r;
17490 
17491     /* Return radial velocity in km/s. */
17492        double rv = 1e-3 * pvs.vel.r * DAU / DAYSEC;
17493 
17494     /* OK status. */
17495        return new CatalogCoords(ra, pvs.pos.phi, pmr, pmd, px, rv);
17496 
17497         }
17498     
17499 
17500     /**
17501     *  Update a pv-vector.
17502     *
17503     *<p>This function is derived from the International Astronomical Union's
17504     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17505     *
17506     *<p>Status:  vector/matrix support function.
17507     *
17508     *<!-- Given: -->
17509     *     @param dt        double            time interval
17510     *     @param pv        double[2][3]      pv-vector
17511     *
17512     *<!-- Returned: -->
17513     *     @return upv       double[2][3]       <u>returned</u> p updated, v unchanged
17514     *
17515     * <p>Notes:
17516     * <ol>
17517     *
17518     * <li> "Update" means "refer the position component of the vector
17519     *     to a new date dt time units from the existing date".
17520     *
17521     * <li> The time units of dt must match those of the velocity.
17522     *
17523     * <li> It is permissible for pv and upv to be the same array.
17524     *</ol>
17525     *<p>Called:<ul>
17526     *     <li>{@link #jauPpsp} p-vector plus scaled p-vector
17527     *     <li>{@link #jauCp} copy p-vector
17528     * </ul>
17529     *@version 2008 November 17
17530     *
17531     *  @since Release 20101201
17532     *
17533     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17534     */
17535     public static double[][] jauPvu(double dt, double pv[][] )
17536     {
17537        double upv[][] = new double[2][3];
17538        upv[0] = jauPpsp(pv[0], dt, pv[1]);
17539        jauCp(pv[1], upv[1]);
17540 
17541        return upv;
17542 
17543         }
17544     
17545 
17546     /**
17547     *  Update a pv-vector, discarding the velocity component.
17548     *
17549     *<p>This function is derived from the International Astronomical Union's
17550     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17551     *
17552     *<p>Status:  vector/matrix support function.
17553     *
17554     *<!-- Given: -->
17555     *     @param dt        double             time interval
17556     *     @param pv        double[2][3]       pv-vector
17557     *
17558     *<!-- Returned: -->
17559     *     @return p         double[3]           <u>returned</u> p-vector
17560     *
17561     * <p>Notes:
17562     * <ol>
17563     *
17564     * <li> "Update" means "refer the position component of the vector to a
17565     *     new date dt time units from the existing date".
17566     *
17567     * <li> The time units of dt must match those of the velocity.
17568     *</ol>
17569     *@version 2008 May 11
17570     *
17571     *  @since Release 20101201
17572     *
17573     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17574     */
17575     public static double[] jauPvup(double dt, double pv[][] )
17576     {
17577         double p[] = new double[3];
17578        p[0] = pv[0][0] + dt * pv[1][0];
17579        p[1] = pv[0][1] + dt * pv[1][1];
17580        p[2] = pv[0][2] + dt * pv[1][2];
17581 
17582        return p;
17583 
17584         }
17585     
17586 
17587     /**
17588     *  Outer (=vector=cross) product of two pv-vectors.
17589     *
17590     *<p>This function is derived from the International Astronomical Union's
17591     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17592     *
17593     *<p>Status:  vector/matrix support function.
17594     *
17595     *<!-- Given: -->
17596     *     @param a         double[2][3]       first pv-vector
17597     *     @param b         double[2][3]       second pv-vector
17598     *
17599     *<!-- Returned: -->
17600     *     @return axb       double[2][3]        <u>returned</u> a x b
17601     *
17602     * <p>Notes:
17603     * <ol>
17604     *
17605     * <li> If the position and velocity components of the two pv-vectors are
17606     *     ( ap, av ) and ( bp, bv ), the result, a x b, is the pair of
17607     *     vectors ( ap x bp, ap x bv + av x bp ).  The two vectors are the
17608     *     cross-product of the two p-vectors and its derivative.
17609     *
17610     * <li> It is permissible to re-use the same array for any of the
17611     *     arguments.
17612     *</ol>
17613     *<p>Called:<ul>
17614     *     <li>{@link #jauCpv} copy pv-vector
17615     *     <li>{@link #jauPxp} vector product of two p-vectors
17616     *     <li>{@link #jauPpp} p-vector plus p-vector
17617     * </ul>
17618     *@version 2008 November 18
17619     *
17620     *  @since Release 20101201
17621     *
17622     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17623     */
17624     public static double[][] jauPvxpv(double a[][], double b[][] )
17625     {
17626        double wa[][] = new double[2][3], wb[][] = new double[2][3], axbd[] = new double[3], adxb[] = new double[3];
17627 
17628        double axb[][] = new double[2][3];
17629     /* Make copies of the inputs. */
17630        jauCpv(a, wa);
17631        jauCpv(b, wb);
17632 
17633     /* a x b = position part of result. */
17634        axb[0] = jauPxp(wa[0], wb[0]);
17635 
17636     /* a x bdot + adot x b = velocity part of result. */
17637        axbd = jauPxp(wa[0],wb[1]);
17638        adxb = jauPxp(wa[1],wb[0]);
17639        axb[1] = jauPpp(axbd, adxb);
17640 
17641        return axb;
17642 
17643         }
17644     
17645 
17646     /**
17647     *  p-vector outer (=vector=cross) product.
17648     *
17649     *<p>This function is derived from the International Astronomical Union's
17650     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17651     *
17652     *<p>Status:  vector/matrix support function.
17653     *
17654     *<!-- Given: -->
17655     *     @param a         double[3]       first p-vector
17656     *     @param b         double[3]       second p-vector
17657     *
17658     *<!-- Returned: -->
17659     *     @return axb       double[3]        <u>returned</u> a x b
17660     *
17661     *  Note:
17662     *     It is permissible to re-use the same array for any of the
17663     *     arguments.
17664     *
17665     *@version 2008 November 18
17666     *
17667     *  @since Release 20101201
17668     *
17669     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17670     */
17671     public static double[] jauPxp(double a[] , double b[]  )
17672     {
17673        double xa, ya, za, xb, yb, zb;
17674        double axb[] = new double[3];
17675 
17676        xa = a[0];
17677        ya = a[1];
17678        za = a[2];
17679        xb = b[0];
17680        yb = b[1];
17681        zb = b[2];
17682        axb[0] = ya*zb - za*yb;
17683        axb[1] = za*xb - xa*zb;
17684        axb[2] = xa*yb - ya*xb;
17685 
17686        return axb;
17687 
17688         }
17689     
17690 
17691     /**
17692     *  Express an r-matrix as an r-vector.
17693     *
17694     *<p>This function is derived from the International Astronomical Union's
17695     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17696     *
17697     *<p>Status:  vector/matrix support function.
17698     *
17699     *<!-- Given: -->
17700     *     @param r         double[3][3]     rotation matrix
17701     *
17702     *<!-- Returned: -->
17703     *     @return w         double[3]         <u>returned</u> rotation vector (Note 1)
17704     *
17705     * <p>Notes:
17706     * <ol>
17707     *
17708     * <li> A rotation matrix describes a rotation through some angle about
17709     *     some arbitrary axis called the Euler axis.  The "rotation vector"
17710     *     returned by this function has the same direction as the Euler axis,
17711     *     and its magnitude is the angle in radians.  (The magnitude and
17712     *     direction can be separated by means of the function jauPn.)
17713     *
17714     * <li> If r is null, so is the result.  If r is not a rotation matrix
17715     *     the result is undefined;  r must be proper (i.e. have a positive
17716     *     determinant) and real orthogonal (inverse = transpose).
17717     *
17718     * <li> The reference frame rotates clockwise as seen looking along
17719     *     the rotation vector from the origin.
17720     *</ol>
17721     *@version 2008 May 12
17722     *
17723     *  @since Release 20101201
17724     *
17725     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17726     */
17727     public static double[] jauRm2v(double r[][] )
17728     {
17729        double x, y, z, s2, c2, phi, f;
17730        double w[] = new double[3];
17731 
17732        x = r[1][2] - r[2][1];
17733        y = r[2][0] - r[0][2];
17734        z = r[0][1] - r[1][0];
17735        s2 = sqrt(x*x + y*y + z*z);
17736        if (s2 > 0) {
17737           c2 = r[0][0] + r[1][1] + r[2][2] - 1;
17738           phi = atan2(s2, c2);
17739           f =  phi / s2;
17740           w[0] = x * f;
17741           w[1] = y * f;
17742           w[2] = z * f;
17743        } else {
17744           w[0] = 0.0;
17745           w[1] = 0.0;
17746           w[2] = 0.0;
17747        }
17748 
17749        return w;
17750 
17751         }
17752     
17753 
17754     /**
17755     *  Form the r-matrix corresponding to a given r-vector.
17756     *
17757     *<p>This function is derived from the International Astronomical Union's
17758     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17759     *
17760     *<p>Status:  vector/matrix support function.
17761     *
17762     *<!-- Given: -->
17763     *     @param w         double[3]       rotation vector (Note 1)
17764     *
17765     *<!-- Returned: -->
17766     *     @return r         double[3][3]      <u>returned</u> rotation matrix
17767     *
17768     * <p>Notes:
17769     * <ol>
17770     *
17771     * <li> A rotation matrix describes a rotation through some angle about
17772     *     some arbitrary axis called the Euler axis.  The "rotation vector"
17773     *     supplied to This function has the same direction as the Euler
17774     *     axis, and its magnitude is the angle in radians.
17775     *
17776     * <li> If w is null, the unit matrix is returned.
17777     *
17778     * <li> The reference frame rotates clockwise as seen looking along the
17779     *     rotation vector from the origin.
17780     *</ol>
17781     *@version 2008 May 11
17782     *
17783     *  @since Release 20101201
17784     *
17785     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17786     */
17787     public static double[][] jauRv2m(double w[])
17788     {
17789        double x, y, z, phi, s, c, f;
17790        double r[][] = new double[3][3];
17791 
17792 
17793     /* Euler angle (magnitude of rotation vector) and functions. */
17794        x = w[0];
17795        y = w[1];
17796        z = w[2];
17797        phi = sqrt(x*x + y*y + z*z);
17798        s = sin(phi);
17799        c = cos(phi);
17800        f = 1.0 - c;
17801 
17802     /* Euler axis (direction of rotation vector), perhaps null. */
17803        if (phi > 0.0) {
17804            x /= phi;
17805            y /= phi;
17806            z /= phi;
17807        }
17808 
17809     /* Form the rotation matrix. */
17810        r[0][0] = x*x*f + c;
17811        r[0][1] = x*y*f + z*s;
17812        r[0][2] = x*z*f - y*s;
17813        r[1][0] = y*x*f - z*s;
17814        r[1][1] = y*y*f + c;
17815        r[1][2] = y*z*f + x*s;
17816        r[2][0] = z*x*f + y*s;
17817        r[2][1] = z*y*f - x*s;
17818        r[2][2] = z*z*f + c;
17819 
17820        return r;
17821 
17822         }
17823     
17824 
17825     /**
17826     *  Rotate an r-matrix about the x-axis.
17827     *
17828     *<p>This function is derived from the International Astronomical Union's
17829     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17830     *
17831     *<p>Status:  vector/matrix support function.
17832     *
17833     *<!-- Given: -->
17834     *     @param phi     double           angle (radians)
17835     *
17836     *  Given and returned:
17837     *      @param r      double[3][3]    r-matrix <u>given and returned</u>
17838     *
17839     *  Sign convention:  The matrix can be used to rotate the reference
17840     *  frame of a vector.  Calling this function with positive phi
17841     *  incorporates in the matrix an additional rotation, about the x-axis,
17842     *  anticlockwise as seen looking towards the origin from positive x.
17843     *
17844     *<p>Called:<ul>
17845     *     <li>{@link #jauIr} initialize r-matrix to identity
17846     *     <li>{@link #jauRxr} product of two r-matrices
17847     *     <li>{@link #jauCr} copy r-matrix
17848     * </ul>
17849     *@version 2008 May 22
17850     *
17851     *  @since Release 20101201
17852     *
17853     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17854     */
17855     public static void jauRx(double phi, double r[][])
17856     {
17857        double s, c, a[][] = new double[3][3], w[][];
17858 
17859 
17860     /* Matrix representing new rotation. */
17861        s = sin(phi);
17862        c = cos(phi);
17863        jauIr(a);
17864        a[1][1] =  c;
17865        a[2][1] = -s;
17866        a[1][2] =  s;
17867        a[2][2] =  c;
17868 
17869     /* Rotate. */
17870        w = jauRxr(a, r);
17871 
17872     /* Return result. */
17873        jauCr(w, r);
17874 
17875        return;
17876 
17877         }
17878     
17879 
17880     /**
17881     *  Multiply a p-vector by an r-matrix.
17882     *
17883     *<p>This function is derived from the International Astronomical Union's
17884     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17885     *
17886     *<p>Status:  vector/matrix support function.
17887     *
17888     *<!-- Given: -->
17889     *     @param r         double[3][3]     r-matrix
17890     *     @param p         double[3]        p-vector
17891     *
17892     *<!-- Returned: -->
17893     *     @return rp        double[3]         <u>returned</u> r * p
17894     *
17895     *  Note:
17896     *     It is permissible for p and rp to be the same array.
17897     *
17898     *<p>Called:<ul>
17899     *     <li>{@link #jauCp} copy p-vector
17900     * </ul>
17901     *@version 2008 October 28
17902     *
17903     *  @since Release 20101201
17904     *
17905     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17906     */
17907     public static double[] jauRxp(double r[][], double p[])
17908     {
17909        double w, wrp[] = new double[3] ;
17910        int i, j;
17911 
17912 
17913     /* Matrix r * vector p. */
17914        for (j = 0; j < 3; j++) {
17915            w = 0.0;
17916            for (i = 0; i < 3; i++) {
17917                w += r[j][i] * p[i];
17918            }
17919            wrp[j] = w;
17920        }
17921 
17922 
17923        return wrp;
17924 
17925         }
17926     
17927 
17928     /**
17929     *  Multiply a pv-vector by an r-matrix.
17930     *
17931     *<p>This function is derived from the International Astronomical Union's
17932     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17933     *
17934     *<p>Status:  vector/matrix support function.
17935     *
17936     *<!-- Given: -->
17937     *     @param r         double[3][3]     r-matrix
17938     *     @param pv        double[2][3]     pv-vector
17939     *
17940     *<!-- Returned: -->
17941     *     @return rpv       double[2][3]      <u>returned</u> r * pv
17942     *
17943     *  Note:
17944     *     It is permissible for pv and rpv to be the same array.
17945     *
17946     *<p>Called:<ul>
17947     *     <li>{@link #jauRxp} product of r-matrix and p-vector
17948     * </ul>
17949     *@version 2008 October 28
17950     *
17951     *  @since Release 20101201
17952     *
17953     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17954     */
17955     public static double[][] jauRxpv(double r[][], double pv[][])
17956     {
17957        double rpv[][] = new double[2][0];
17958        rpv[0] = jauRxp(r, pv[0]);
17959        rpv[1] = jauRxp(r, pv[1]);
17960 
17961        return rpv;
17962 
17963         }
17964     
17965 
17966     /**
17967     *  Multiply two r-matrices.
17968     *
17969     *<p>This function is derived from the International Astronomical Union's
17970     *  SOFA (Standards Of Fundamental Astronomy) software collection.
17971     *
17972     *<p>Status:  vector/matrix support function.
17973     *
17974     *<!-- Given: -->
17975     *     @param a         double[3][3]     first r-matrix
17976     *     @param b         double[3][3]     second r-matrix
17977     *
17978     *<!-- Returned: -->
17979     *     @return atb       double[3][3]      <u>returned</u> a * b
17980     *
17981     *  Note:
17982     *     It is permissible to re-use the same array for any of the
17983     *     arguments.
17984     *
17985     *<p>Called:<ul>
17986     *     <li>{@link #jauCr} copy r-matrix
17987     * </ul>
17988     *@version 2008 November 18
17989     *
17990     *  @since Release 20101201
17991     *
17992     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
17993     */
17994     public static double[][] jauRxr(double a[][], double b[][])
17995     {
17996        int i, j, k;
17997        double w, wm[][] = new double[3][3];
17998 
17999 
18000        for (i = 0; i < 3; i++) {
18001           for (j = 0; j < 3; j++) {
18002              w = 0.0;
18003              for (k = 0; k < 3; k++) {
18004                 w +=  a[i][k] * b[k][j];
18005              }
18006              wm[i][j] = w;
18007           }
18008        }
18009 
18010        return wm;
18011 
18012      }
18013     
18014 
18015     /**
18016     *  Rotate an r-matrix about the y-axis.
18017     *
18018     *<p>This function is derived from the International Astronomical Union's
18019     *  SOFA (Standards Of Fundamental Astronomy) software collection.
18020     *
18021     *<p>Status:  vector/matrix support function.
18022     *
18023     *<!-- Given: -->
18024     *     @param theta   double           angle (radians)
18025     *
18026     *  Given and returned:
18027     *     @param r      double[3][3]   <u>given &amp; returned</u> r-matrix
18028     *
18029     *  Sign convention:  The matrix can be used to rotate the reference
18030     *  frame of a vector.  Calling This function with positive theta
18031     *  incorporates in the matrix an additional rotation, about the y-axis,
18032     *  anticlockwise as seen looking towards the origin from positive y.
18033     *
18034     *<p>Called:<ul>
18035     *     <li>{@link #jauIr} initialize r-matrix to identity
18036     *     <li>{@link #jauRxr} product of two r-matrices
18037     *     <li>{@link #jauCr} copy r-matrix
18038     * </ul>
18039     *@version 2008 May 22
18040     *
18041     *  @since Release 20101201
18042     *
18043     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
18044     */
18045     public static void jauRy(double theta, double r[][])
18046     {
18047        double s, c, a[][] = new double[3][3], w[][];
18048 
18049 
18050     /* Matrix representing new rotation. */
18051        s = sin(theta);
18052        c = cos(theta);
18053        jauIr(a);
18054        a[0][0] =  c;
18055        a[2][0] =  s;
18056        a[0][2] = -s;
18057        a[2][2] =  c;
18058 
18059     /* Rotate. */
18060        w = jauRxr(a, r);
18061 
18062     /* Return result. */
18063        jauCr(w, r);
18064 
18065        return;
18066 
18067         }
18068     
18069 
18070     /**
18071     *  Rotate an r-matrix about the z-axis.
18072     *
18073     *<p>This function is derived from the International Astronomical Union's
18074     *  SOFA (Standards Of Fundamental Astronomy) software collection.
18075     *
18076     *<p>Status:  vector/matrix support function.
18077     *
18078     *<!-- Given: -->
18079     *     @param psi     double           angle (radians)
18080     *
18081     *  Given and returned:
18082     *     @param r      double[3][3]    <u>given &amp; retuned</u>r-matrix, rotated
18083     *
18084     *  Sign convention:  The matrix can be used to rotate the reference
18085     *  frame of a vector.  Calling This function with positive psi
18086     *  incorporates in the matrix an additional rotation, about the z-axis,
18087     *  anticlockwise as seen looking towards the origin from positive z.
18088     *
18089     *<p>Called:<ul>
18090     *     <li>{@link #jauIr} initialize r-matrix to identity
18091     *     <li>{@link #jauRxr} product of two r-matrices
18092     *     <li>{@link #jauCr} copy r-matrix
18093     * </ul>
18094     *@version 2008 May 22
18095     *
18096     *  @since Release 20101201
18097     *
18098     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
18099     */
18100     public static void jauRz(double psi, double r[][])
18101     {
18102        double s, c, a[][] = new double[3][3], w[][];
18103 
18104 
18105     /* Matrix representing new rotation. */
18106        s = sin(psi);
18107        c = cos(psi);
18108        jauIr(a);
18109        a[0][0] =  c;
18110        a[1][0] = -s;
18111        a[0][1] =  s;
18112        a[1][1] =  c;
18113 
18114     /* Rotate. */
18115        w = jauRxr(a, r);
18116 
18117     /* Return result. */
18118        jauCr(w, r);
18119 
18120        return;
18121 
18122         }
18123     
18124 
18125     /**
18126     *  The CIO locator s, positioning the Celestial Intermediate Origin on
18127     *  the equator of the Celestial Intermediate Pole, given the CIP's X,Y
18128     *  coordinates.  Compatible with IAU 2000A precession-nutation.
18129     *
18130     *<p>This function is derived from the International Astronomical Union's
18131     *  SOFA (Standards Of Fundamental Astronomy) software collection.
18132     *
18133     *<p>Status:  canonical model.
18134     *
18135     *<!-- Given: -->
18136     *     @param date1 double TT as a 2-part Julian Date (Note 1)
18137     *     @param date2 double TT as a 2-part Julian Date (Note 1)
18138     *     @param x double     CIP coordinates (Note 3)
18139     *     @param y double     CIP coordinates (Note 3) 
18140     *
18141     * <!-- Returned (function value): -->
18142     *  @return double    the CIO locator s in radians (Note 2)
18143     *
18144     * <p>Notes:
18145     * <ol>
18146     *
18147     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
18148     *     convenient way between the two arguments.  For example,
18149     *     JD(TT)=2450123.7 could be expressed in any of these ways,
18150     *     among others:
18151     *<pre>
18152     *            date1          date2
18153     *
18154     *         2450123.7           0.0       (JD method)
18155     *         2451545.0       -1421.3       (J2000 method)
18156     *         2400000.5       50123.2       (MJD method)
18157     *         2450123.5           0.2       (date &amp; time method)
18158     *</pre>
18159     *     The JD method is the most natural and convenient to use in
18160     *     cases where the loss of several decimal digits of resolution
18161     *     is acceptable.  The J2000 method is best matched to the way
18162     *     the argument is handled internally and will deliver the
18163     *     optimum resolution.  The MJD method and the date &amp; time methods
18164     *     are both good compromises between resolution and convenience.
18165     *
18166     * <li> The CIO locator s is the difference between the right ascensions
18167     *     of the same point in two systems:  the two systems are the GCRS
18168     *     and the CIP,CIO, and the point is the ascending node of the
18169     *     CIP equator.  The quantity s remains below 0.1 arcsecond
18170     *     throughout 1900-2100.
18171     *
18172     * <li> The series used to compute s is in fact for s+XY/2, where X and Y
18173     *     are the x and y components of the CIP unit vector;  this series
18174     *     is more compact than a direct series for s would be.  This
18175     *     function requires X,Y to be supplied by the caller, who is
18176     *     responsible for providing values that are consistent with the
18177     *     supplied date.
18178     *
18179     * <li> The model is consistent with the IAU 2000A precession-nutation.
18180     *</ol>
18181     *<p>Called:<ul>
18182     *     <li>{@link #jauFal03} mean anomaly of the Moon
18183     *     <li>{@link #jauFalp03} mean anomaly of the Sun
18184     *     <li>{@link #jauFaf03} mean argument of the latitude of the Moon
18185     *     <li>{@link #jauFad03} mean elongation of the Moon from the Sun
18186     *     <li>{@link #jauFaom03} mean longitude of the Moon's ascending node
18187     *     <li>{@link #jauFave03} mean longitude of Venus
18188     *     <li>{@link #jauFae03} mean longitude of Earth
18189     *     <li>{@link #jauFapa03} general accumulated precession in longitude
18190     * </ul>
18191     *<p>References:
18192     *
18193     *    <p>Capitaine, N., Chapront, J., Lambert, S. and Wallace, P.,
18194     *     "Expressions for the Celestial Intermediate Pole and Celestial
18195     *     Ephemeris Origin consistent with the IAU 2000A precession-
18196     *     nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
18197     *
18198     *     n.b. The celestial ephemeris origin (CEO) was renamed "celestial
18199     *          intermediate origin" (CIO) by IAU 2006 Resolution 2.
18200     *
18201     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
18202     *     IERS Technical Note No. 32, BKG (2004)
18203     *
18204     *@version 2010 January 18
18205     *
18206     *  @since Release 20101201
18207     *
18208     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
18209     */
18210     public static double jauS00(double date1, double date2, double x, double y)
18211     {
18212     /* Time since J2000.0, in Julian centuries */
18213        double t;
18214 
18215     /* Miscellaneous */
18216        int i, j;
18217        double a, w0, w1, w2, w3, w4, w5;
18218 
18219     /* Fundamental arguments */
18220        double fa[] = new double[8];
18221 
18222     /* Returned value */
18223        double s;
18224 
18225     /* --------------------- */
18226     /* The series for s+XY/2 */
18227     /* --------------------- */
18228 
18229     /* Polynomial coefficients */
18230        final double sp[] = {
18231 
18232        /* 1-6 */
18233               94.00e-6,
18234             3808.35e-6,
18235             -119.94e-6,
18236           -72574.09e-6,
18237               27.70e-6,
18238               15.61e-6
18239        };
18240 
18241     /* Terms of order t^0 */
18242        final TERM s0[] = {
18243 
18244        /* 1-10 */
18245           new TERM(new int[]{ 0,  0,  0,  0,  1,  0,  0,  0}, -2640.73e-6,   0.39e-6 ),
18246           new TERM(new int[]{ 0,  0,  0,  0,  2,  0,  0,  0},   -63.53e-6,   0.02e-6 ),
18247           new TERM(new int[]{ 0,  0,  2, -2,  3,  0,  0,  0},   -11.75e-6,  -0.01e-6 ),
18248           new TERM(new int[]{ 0,  0,  2, -2,  1,  0,  0,  0},   -11.21e-6,  -0.01e-6 ),
18249           new TERM(new int[]{ 0,  0,  2, -2,  2,  0,  0,  0},     4.57e-6,   0.00e-6 ),
18250           new TERM(new int[]{ 0,  0,  2,  0,  3,  0,  0,  0},    -2.02e-6,   0.00e-6 ),
18251           new TERM(new int[]{ 0,  0,  2,  0,  1,  0,  0,  0},    -1.98e-6,   0.00e-6 ),
18252           new TERM(new int[]{ 0,  0,  0,  0,  3,  0,  0,  0},     1.72e-6,   0.00e-6 ),
18253           new TERM(new int[]{ 0,  1,  0,  0,  1,  0,  0,  0},     1.41e-6,   0.01e-6 ),
18254           new TERM(new int[]{ 0,  1,  0,  0, -1,  0,  0,  0},     1.26e-6,   0.01e-6 ),
18255 
18256        /* 11-20 */
18257           new TERM(new int[]{ 1,  0,  0,  0, -1,  0,  0,  0},     0.63e-6,   0.00e-6 ),
18258           new TERM(new int[]{ 1,  0,  0,  0,  1,  0,  0,  0},     0.63e-6,   0.00e-6 ),
18259           new TERM(new int[]{ 0,  1,  2, -2,  3,  0,  0,  0},    -0.46e-6,   0.00e-6 ),
18260           new TERM(new int[]{ 0,  1,  2, -2,  1,  0,  0,  0},    -0.45e-6,   0.00e-6 ),
18261           new TERM(new int[]{ 0,  0,  4, -4,  4,  0,  0,  0},    -0.36e-6,   0.00e-6 ),
18262           new TERM(new int[]{ 0,  0,  1, -1,  1, -8, 12,  0},     0.24e-6,   0.12e-6 ),
18263           new TERM(new int[]{ 0,  0,  2,  0,  0,  0,  0,  0},    -0.32e-6,   0.00e-6 ),
18264           new TERM(new int[]{ 0,  0,  2,  0,  2,  0,  0,  0},    -0.28e-6,   0.00e-6 ),
18265           new TERM(new int[]{ 1,  0,  2,  0,  3,  0,  0,  0},    -0.27e-6,   0.00e-6 ),
18266           new TERM(new int[]{ 1,  0,  2,  0,  1,  0,  0,  0},    -0.26e-6,   0.00e-6 ),
18267 
18268        /* 21-30 */
18269           new TERM(new int[]{ 0,  0,  2, -2,  0,  0,  0,  0},     0.21e-6,   0.00e-6 ),
18270           new TERM(new int[]{ 0,  1, -2,  2, -3,  0,  0,  0},    -0.19e-6,   0.00e-6 ),
18271           new TERM(new int[]{ 0,  1, -2,  2, -1,  0,  0,  0},    -0.18e-6,   0.00e-6 ),
18272           new TERM(new int[]{ 0,  0,  0,  0,  0,  8,-13, -1},     0.10e-6,  -0.05e-6 ),
18273           new TERM(new int[]{ 0,  0,  0,  2,  0,  0,  0,  0},    -0.15e-6,   0.00e-6 ),
18274           new TERM(new int[]{ 2,  0, -2,  0, -1,  0,  0,  0},     0.14e-6,   0.00e-6 ),
18275           new TERM(new int[]{ 0,  1,  2, -2,  2,  0,  0,  0},     0.14e-6,   0.00e-6 ),
18276           new TERM(new int[]{ 1,  0,  0, -2,  1,  0,  0,  0},    -0.14e-6,   0.00e-6 ),
18277           new TERM(new int[]{ 1,  0,  0, -2, -1,  0,  0,  0},    -0.14e-6,   0.00e-6 ),
18278           new TERM(new int[]{ 0,  0,  4, -2,  4,  0,  0,  0},    -0.13e-6,   0.00e-6 ),
18279 
18280        /* 31-33 */
18281           new TERM(new int[]{ 0,  0,  2, -2,  4,  0,  0,  0},     0.11e-6,   0.00e-6 ),
18282           new TERM(new int[]{ 1,  0, -2,  0, -3,  0,  0,  0},    -0.11e-6,   0.00e-6 ),
18283           new TERM(new int[]{ 1,  0, -2,  0, -1,  0,  0,  0},    -0.11e-6,   0.00e-6 )
18284        };
18285 
18286     /* Terms of order t^1 */
18287        final TERM s1[] ={
18288 
18289        /* 1-3 */
18290           new TERM(new int[]{ 0,  0,  0,  0,  2,  0,  0,  0},    -0.07e-6,   3.57e-6 ),
18291           new TERM(new int[]{ 0,  0,  0,  0,  1,  0,  0,  0},     1.71e-6,  -0.03e-6 ),
18292           new TERM(new int[]{ 0,  0,  2, -2,  3,  0,  0,  0},     0.00e-6,   0.48e-6 )
18293        };
18294 
18295     /* Terms of order t^2 */
18296        final TERM s2[] ={
18297 
18298        /* 1-10 */
18299           new TERM(new int[]{ 0,  0,  0,  0,  1,  0,  0,  0},   743.53e-6,  -0.17e-6 ),
18300           new TERM(new int[]{ 0,  0,  2, -2,  2,  0,  0,  0},    56.91e-6,   0.06e-6 ),
18301           new TERM(new int[]{ 0,  0,  2,  0,  2,  0,  0,  0},     9.84e-6,  -0.01e-6 ),
18302           new TERM(new int[]{ 0,  0,  0,  0,  2,  0,  0,  0},    -8.85e-6,   0.01e-6 ),
18303           new TERM(new int[]{ 0,  1,  0,  0,  0,  0,  0,  0},    -6.38e-6,  -0.05e-6 ),
18304           new TERM(new int[]{ 1,  0,  0,  0,  0,  0,  0,  0},    -3.07e-6,   0.00e-6 ),
18305           new TERM(new int[]{ 0,  1,  2, -2,  2,  0,  0,  0},     2.23e-6,   0.00e-6 ),
18306           new TERM(new int[]{ 0,  0,  2,  0,  1,  0,  0,  0},     1.67e-6,   0.00e-6 ),
18307           new TERM(new int[]{ 1,  0,  2,  0,  2,  0,  0,  0},     1.30e-6,   0.00e-6 ),
18308           new TERM(new int[]{ 0,  1, -2,  2, -2,  0,  0,  0},     0.93e-6,   0.00e-6 ),
18309 
18310        /* 11-20 */
18311           new TERM(new int[]{ 1,  0,  0, -2,  0,  0,  0,  0},     0.68e-6,   0.00e-6 ),
18312           new TERM(new int[]{ 0,  0,  2, -2,  1,  0,  0,  0},    -0.55e-6,   0.00e-6 ),
18313           new TERM(new int[]{ 1,  0, -2,  0, -2,  0,  0,  0},     0.53e-6,   0.00e-6 ),
18314           new TERM(new int[]{ 0,  0,  0,  2,  0,  0,  0,  0},    -0.27e-6,   0.00e-6 ),
18315           new TERM(new int[]{ 1,  0,  0,  0,  1,  0,  0,  0},    -0.27e-6,   0.00e-6 ),
18316           new TERM(new int[]{ 1,  0, -2, -2, -2,  0,  0,  0},    -0.26e-6,   0.00e-6 ),
18317           new TERM(new int[]{ 1,  0,  0,  0, -1,  0,  0,  0},    -0.25e-6,   0.00e-6 ),
18318           new TERM(new int[]{ 1,  0,  2,  0,  1,  0,  0,  0},     0.22e-6,   0.00e-6 ),
18319           new TERM(new int[]{ 2,  0,  0, -2,  0,  0,  0,  0},    -0.21e-6,   0.00e-6 ),
18320           new TERM(new int[]{ 2,  0, -2,  0, -1,  0,  0,  0},     0.20e-6,   0.00e-6 ),
18321 
18322        /* 21-25 */
18323           new TERM(new int[]{ 0,  0,  2,  2,  2,  0,  0,  0},     0.17e-6,   0.00e-6 ),
18324           new TERM(new int[]{ 2,  0,  2,  0,  2,  0,  0,  0},     0.13e-6,   0.00e-6 ),
18325           new TERM(new int[]{ 2,  0,  0,  0,  0,  0,  0,  0},    -0.13e-6,   0.00e-6 ),
18326           new TERM(new int[]{ 1,  0,  2, -2,  2,  0,  0,  0},    -0.12e-6,   0.00e-6 ),
18327           new TERM(new int[]{ 0,  0,  2,  0,  0,  0,  0,  0},    -0.11e-6,   0.00e-6 )
18328        };
18329 
18330     /* Terms of order t^3 */
18331        final TERM s3[] ={
18332 
18333        /* 1-4 */
18334           new TERM(new int[]{ 0,  0,  0,  0,  1,  0,  0,  0},     0.30e-6, -23.51e-6 ),
18335           new TERM(new int[]{ 0,  0,  2, -2,  2,  0,  0,  0},    -0.03e-6,  -1.39e-6 ),
18336           new TERM(new int[]{ 0,  0,  2,  0,  2,  0,  0,  0},    -0.01e-6,  -0.24e-6 ),
18337           new TERM(new int[]{ 0,  0,  0,  0,  2,  0,  0,  0},     0.00e-6,   0.22e-6 )
18338        };
18339 
18340     /* Terms of order t^4 */
18341        final TERM s4[] ={
18342 
18343        /* 1-1 */
18344           new TERM(new int[]{ 0,  0,  0,  0,  1,  0,  0,  0},    -0.26e-6,  -0.01e-6 )
18345        };
18346 
18347     /* Number of terms in the series */
18348        final int NS0 = s0.length;
18349        final int NS1 = s1.length;
18350        final int NS2 = s2.length;
18351        final int NS3 = s3.length;
18352        final int NS4 = s4.length;
18353 
18354     /*--------------------------------------------------------------------*/
18355 
18356     /* Interval between fundamental epoch J2000.0 and current date (JC). */
18357        t = ((date1 - DJ00) + date2) / DJC;
18358 
18359     /* Fundamental Arguments (from IERS Conventions 2003) */
18360 
18361     /* Mean anomaly of the Moon. */
18362        fa[0] = jauFal03(t);
18363 
18364     /* Mean anomaly of the Sun. */
18365        fa[1] = jauFalp03(t);
18366 
18367     /* Mean longitude of the Moon minus that of the ascending node. */
18368        fa[2] = jauFaf03(t);
18369 
18370     /* Mean elongation of the Moon from the Sun. */
18371        fa[3] = jauFad03(t);
18372 
18373     /* Mean longitude of the ascending node of the Moon. */
18374        fa[4] = jauFaom03(t);
18375 
18376     /* Mean longitude of Venus. */
18377        fa[5] = jauFave03(t);
18378 
18379     /* Mean longitude of Earth. */
18380        fa[6] = jauFae03(t);
18381 
18382     /* General precession in longitude. */
18383        fa[7] = jauFapa03(t);
18384 
18385     /* Evaluate s. */
18386        w0 = sp[0];
18387        w1 = sp[1];
18388        w2 = sp[2];
18389        w3 = sp[3];
18390        w4 = sp[4];
18391        w5 = sp[5];
18392 
18393        for (i = NS0-1; i >= 0; i--) {
18394        a = 0.0;
18395        for (j = 0; j < 8; j++) {
18396            a += (double)s0[i].nfa[j] * fa[j];
18397        }
18398        w0 += s0[i].s * sin(a) + s0[i].c * cos(a);
18399        }
18400 
18401        for (i = NS1-1; i >= 0; i--) {
18402        a = 0.0;
18403        for (j = 0; j < 8; j++) {
18404            a += (double)s1[i].nfa[j] * fa[j];
18405        }
18406        w1 += s1[i].s * sin(a) + s1[i].c * cos(a);
18407        }
18408 
18409        for (i = NS2-1; i >= 0; i--) {
18410        a = 0.0;
18411        for (j = 0; j < 8; j++) {
18412            a += (double)s2[i].nfa[j] * fa[j];
18413        }
18414        w2 += s2[i].s * sin(a) + s2[i].c * cos(a);
18415        }
18416 
18417        for (i = NS3-1; i >= 0; i--) {
18418        a = 0.0;
18419        for (j = 0; j < 8; j++) {
18420            a += (double)s3[i].nfa[j] * fa[j];
18421        }
18422        w3 += s3[i].s * sin(a) + s3[i].c * cos(a);
18423        }
18424 
18425        for (i = NS4-1; i >= 0; i--) {
18426        a = 0.0;
18427        for (j = 0; j < 8; j++) {
18428            a += (double)s4[i].nfa[j] * fa[j];
18429        }
18430        w4 += s4[i].s * sin(a) + s4[i].c * cos(a);
18431        }
18432 
18433        s = (w0 +
18434            (w1 +
18435            (w2 +
18436            (w3 +
18437            (w4 +
18438             w5 * t) * t) * t) * t) * t) * DAS2R - x*y/2.0;
18439 
18440        return s;
18441 
18442         }
18443     
18444 
18445     /**
18446     *  The CIO locator s, positioning the Celestial Intermediate Origin on
18447     *  the equator of the Celestial Intermediate Pole, using the IAU 2000A
18448     *  precession-nutation model.
18449     *
18450     *<p>This function is derived from the International Astronomical Union's
18451     *  SOFA (Standards Of Fundamental Astronomy) software collection.
18452     *
18453     *<p>Status:  support function.
18454     *
18455     *<!-- Given: -->
18456     *     @param date1 double TT as a 2-part Julian Date (Note 1)
18457     *     @param date2 double TT as a 2-part Julian Date (Note 1)
18458     *
18459     * <!-- Returned (function value): -->
18460     *  @return double    the CIO locator s in radians (Note 2)
18461     *
18462     * <p>Notes:
18463     * <ol>
18464     *
18465     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
18466     *     convenient way between the two arguments.  For example,
18467     *     JD(TT)=2450123.7 could be expressed in any of these ways,
18468     *     among others:
18469     *<pre>
18470     *            date1          date2
18471     *
18472     *         2450123.7           0.0       (JD method)
18473     *         2451545.0       -1421.3       (J2000 method)
18474     *         2400000.5       50123.2       (MJD method)
18475     *         2450123.5           0.2       (date &amp; time method)
18476     *</pre>
18477     *     The JD method is the most natural and convenient to use in
18478     *     cases where the loss of several decimal digits of resolution
18479     *     is acceptable.  The J2000 method is best matched to the way
18480     *     the argument is handled internally and will deliver the
18481     *     optimum resolution.  The MJD method and the date &amp; time methods
18482     *     are both good compromises between resolution and convenience.
18483     *
18484     * <li> The CIO locator s is the difference between the right ascensions
18485     *     of the same point in two systems.  The two systems are the GCRS
18486     *     and the CIP,CIO, and the point is the ascending node of the
18487     *     CIP equator.  The CIO locator s remains a small fraction of
18488     *     1 arcsecond throughout 1900-2100.
18489     *
18490     * <li> The series used to compute s is in fact for s+XY/2, where X and Y
18491     *     are the x and y components of the CIP unit vector;  this series
18492     *     is more compact than a direct series for s would be.  The present
18493     *     function uses the full IAU 2000A nutation model when predicting
18494     *     the CIP position.  Faster results, with no significant loss of
18495     *     accuracy, can be obtained via the function jauS00b, which uses
18496     *     instead the IAU 2000B truncated model.
18497     *</ol>
18498     *<p>Called:<ul>
18499     *     <li>{@link #jauPnm00a} classical NPB matrix, IAU 2000A
18500     *     <li>{@link #jauBpn2xy} extract CIP X,Y from the BPN matrix
18501     *     <li>{@link #jauS00} the CIO locator s, given X,Y, IAU 2000A
18502     * </ul>
18503     *<p>References:
18504     *
18505     *    <p>Capitaine, N., Chapront, J., Lambert, S. and Wallace, P.,
18506     *     "Expressions for the Celestial Intermediate Pole and Celestial
18507     *     Ephemeris Origin consistent with the IAU 2000A precession-
18508     *     nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
18509     *
18510     *     n.b. The celestial ephemeris origin (CEO) was renamed "celestial
18511     *          intermediate origin" (CIO) by IAU 2006 Resolution 2.
18512     *
18513     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
18514     *     IERS Technical Note No. 32, BKG (2004)
18515     *
18516     *@version 2010 January 18
18517     *
18518     *  @since Release 20101201
18519     *
18520     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
18521     */
18522     public static double jauS00a(double date1, double date2)
18523     {
18524        double s;
18525 
18526 
18527     /* Bias-precession-nutation-matrix, IAU 2000A. */
18528        double rbpn[][] = jauPnm00a(date1, date2);
18529 
18530     /* Extract the CIP coordinates. */
18531        CelestialIntermediatePole cip = jauBpn2xy(rbpn);
18532 
18533     /* Compute the CIO locator s, given the CIP coordinates. */
18534        s = jauS00(date1, date2, cip.x, cip.y);
18535 
18536        return s;
18537 
18538         }
18539     
18540 
18541     /**
18542     *  The CIO locator s, positioning the Celestial Intermediate Origin on
18543     *  the equator of the Celestial Intermediate Pole, using the IAU 2000B
18544     *  precession-nutation model.
18545     *
18546     *<p>This function is derived from the International Astronomical Union's
18547     *  SOFA (Standards Of Fundamental Astronomy) software collection.
18548     *
18549     *<p>Status:  support function.
18550     *
18551     *<!-- Given: -->
18552     *     @param date1 double TT as a 2-part Julian Date (Note 1)
18553     *     @param date2 double TT as a 2-part Julian Date (Note 1)
18554     *
18555     * <!-- Returned (function value): -->
18556     *  @return double    the CIO locator s in radians (Note 2)
18557     *
18558     * <p>Notes:
18559     * <ol>
18560     *
18561     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
18562     *     convenient way between the two arguments.  For example,
18563     *     JD(TT)=2450123.7 could be expressed in any of these ways,
18564     *     among others:
18565     *<pre>
18566     *            date1          date2
18567     *
18568     *         2450123.7           0.0       (JD method)
18569     *         2451545.0       -1421.3       (J2000 method)
18570     *         2400000.5       50123.2       (MJD method)
18571     *         2450123.5           0.2       (date &amp; time method)
18572     *</pre>
18573     *     The JD method is the most natural and convenient to use in
18574     *     cases where the loss of several decimal digits of resolution
18575     *     is acceptable.  The J2000 method is best matched to the way
18576     *     the argument is handled internally and will deliver the
18577     *     optimum resolution.  The MJD method and the date &amp; time methods
18578     *     are both good compromises between resolution and convenience.
18579     *
18580     * <li> The CIO locator s is the difference between the right ascensions
18581     *     of the same point in two systems.  The two systems are the GCRS
18582     *     and the CIP,CIO, and the point is the ascending node of the
18583     *     CIP equator.  The CIO locator s remains a small fraction of
18584     *     1 arcsecond throughout 1900-2100.
18585     *
18586     * <li> The series used to compute s is in fact for s+XY/2, where X and Y
18587     *     are the x and y components of the CIP unit vector;  this series
18588     *     is more compact than a direct series for s would be.  The present
18589     *     function uses the IAU 2000B truncated nutation model when
18590     *     predicting the CIP position.  The function jauS00a uses instead
18591     *     the full IAU 2000A model, but with no significant increase in
18592     *     accuracy and at some cost in speed.
18593     *</ol>
18594     *<p>Called:<ul>
18595     *     <li>{@link #jauPnm00b} classical NPB matrix, IAU 2000B
18596     *     <li>{@link #jauBpn2xy} extract CIP X,Y from the BPN matrix
18597     *     <li>{@link #jauS00} the CIO locator s, given X,Y, IAU 2000A
18598     * </ul>
18599     *<p>References:
18600     *
18601     *    <p>Capitaine, N., Chapront, J., Lambert, S. and Wallace, P.,
18602     *     "Expressions for the Celestial Intermediate Pole and Celestial
18603     *     Ephemeris Origin consistent with the IAU 2000A precession-
18604     *     nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
18605     *
18606     *     n.b. The celestial ephemeris origin (CEO) was renamed "celestial
18607     *          intermediate origin" (CIO) by IAU 2006 Resolution 2.
18608     *
18609     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
18610     *     IERS Technical Note No. 32, BKG (2004)
18611     *
18612     *@version 2010 January 18
18613     *
18614     *  @since Release 20101201
18615     *
18616     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
18617     */
18618     public static double jauS00b(double date1, double date2)
18619     {
18620        double rbpn[][] = new double[3][3], s;
18621 
18622 
18623     /* Bias-precession-nutation-matrix, IAU 2000B. */
18624        rbpn = jauPnm00b(date1, date2);
18625 
18626     /* Extract the CIP coordinates. */
18627        CelestialIntermediatePole cip = jauBpn2xy(rbpn);
18628 
18629     /* Compute the CIO locator s, given the CIP coordinates. */
18630        s = jauS00(date1, date2, cip.x, cip.y);
18631 
18632        return s;
18633 
18634         }
18635     
18636 
18637     /**
18638     *  The CIO locator s, positioning the Celestial Intermediate Origin on
18639     *  the equator of the Celestial Intermediate Pole, given the CIP's X,Y
18640     *  coordinates.  Compatible with IAU 2006/2000A precession-nutation.
18641     *
18642     *<p>This function is derived from the International Astronomical Union's
18643     *  SOFA (Standards Of Fundamental Astronomy) software collection.
18644     *
18645     *<p>Status:  canonical model.
18646     *
18647     *<!-- Given: -->
18648     *     @param date1 double TT as a 2-part Julian Date (Note 1)
18649     *     @param date2 double TT as a 2-part Julian Date (Note 1)
18650     *     @param x double     CIP coordinates (Note 3)
18651     *     @param y double     CIP coordinates (Note 3) 
18652     *
18653     * <!-- Returned (function value): -->
18654     *  @return double    the CIO locator s in radians (Note 2)
18655     *
18656     * <p>Notes:
18657     * <ol>
18658     *
18659     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
18660     *     convenient way between the two arguments.  For example,
18661     *     JD(TT)=2450123.7 could be expressed in any of these ways,
18662     *     among others:
18663     *<pre>
18664     *            date1          date2
18665     *
18666     *         2450123.7           0.0       (JD method)
18667     *         2451545.0       -1421.3       (J2000 method)
18668     *         2400000.5       50123.2       (MJD method)
18669     *         2450123.5           0.2       (date &amp; time method)
18670     *</pre>
18671     *     The JD method is the most natural and convenient to use in
18672     *     cases where the loss of several decimal digits of resolution
18673     *     is acceptable.  The J2000 method is best matched to the way
18674     *     the argument is handled internally and will deliver the
18675     *     optimum resolution.  The MJD method and the date &amp; time methods
18676     *     are both good compromises between resolution and convenience.
18677     *
18678     * <li> The CIO locator s is the difference between the right ascensions
18679     *     of the same point in two systems:  the two systems are the GCRS
18680     *     and the CIP,CIO, and the point is the ascending node of the
18681     *     CIP equator.  The quantity s remains below 0.1 arcsecond
18682     *     throughout 1900-2100.
18683     *
18684     * <li> The series used to compute s is in fact for s+XY/2, where X and Y
18685     *     are the x and y components of the CIP unit vector;  this series
18686     *     is more compact than a direct series for s would be.  This
18687     *     function requires X,Y to be supplied by the caller, who is
18688     *     responsible for providing values that are consistent with the
18689     *     supplied date.
18690     *
18691     * <li> The model is consistent with the "P03" precession (Capitaine et
18692     *     al. 2003), adopted by IAU 2006 Resolution 1, 2006, and the
18693     *     IAU 2000A nutation (with P03 adjustments).
18694     *</ol>
18695     *<p>Called:<ul>
18696     *     <li>{@link #jauFal03} mean anomaly of the Moon
18697     *     <li>{@link #jauFalp03} mean anomaly of the Sun
18698     *     <li>{@link #jauFaf03} mean argument of the latitude of the Moon
18699     *     <li>{@link #jauFad03} mean elongation of the Moon from the Sun
18700     *     <li>{@link #jauFaom03} mean longitude of the Moon's ascending node
18701     *     <li>{@link #jauFave03} mean longitude of Venus
18702     *     <li>{@link #jauFae03} mean longitude of Earth
18703     *     <li>{@link #jauFapa03} general accumulated precession in longitude
18704     * </ul>
18705     *<p>References:
18706     *
18707     *    <p>Capitaine, N., Wallace, P.T. &amp; Chapront, J., 2003, Astron.
18708     *     Astrophys. 432, 355
18709     *
18710     *     <p>McCarthy, D.D., Petit, G. (eds.) 2004, IERS Conventions (2003),
18711     *     IERS Technical Note No. 32, BKG
18712     *
18713     *@version 2009 December 17
18714     *
18715     *  @since Release 20101201
18716     *
18717     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
18718     */
18719     public static double jauS06(double date1, double date2, double x, double y)
18720     {
18721     /* Time since J2000.0, in Julian centuries */
18722        double t;
18723 
18724     /* Miscellaneous */
18725        int i, j;
18726        double a, w0, w1, w2, w3, w4, w5;
18727 
18728     /* Fundamental arguments */
18729        double fa[] = new double[8];
18730 
18731     /* Returned value */
18732        double s;
18733 
18734     /* --------------------- */
18735     /* The series for s+XY/2 */
18736     /* --------------------- */
18737 
18738     /* Polynomial coefficients */
18739        final double sp[] = {
18740 
18741        /* 1-6 */
18742               94.00e-6,
18743             3808.65e-6,
18744             -122.68e-6,
18745           -72574.11e-6,
18746               27.98e-6,
18747               15.62e-6
18748        };
18749 
18750     /* Terms of order t^0 */
18751        final TERM s0[] = {
18752 
18753        /* 1-10 */
18754           new TERM(new int[]{ 0,  0,  0,  0,  1,  0,  0,  0}, -2640.73e-6,   0.39e-6 ),
18755           new TERM(new int[]{ 0,  0,  0,  0,  2,  0,  0,  0},   -63.53e-6,   0.02e-6 ),
18756           new TERM(new int[]{ 0,  0,  2, -2,  3,  0,  0,  0},   -11.75e-6,  -0.01e-6 ),
18757           new TERM(new int[]{ 0,  0,  2, -2,  1,  0,  0,  0},   -11.21e-6,  -0.01e-6 ),
18758           new TERM(new int[]{ 0,  0,  2, -2,  2,  0,  0,  0},     4.57e-6,   0.00e-6 ),
18759           new TERM(new int[]{ 0,  0,  2,  0,  3,  0,  0,  0},    -2.02e-6,   0.00e-6 ),
18760           new TERM(new int[]{ 0,  0,  2,  0,  1,  0,  0,  0},    -1.98e-6,   0.00e-6 ),
18761           new TERM(new int[]{ 0,  0,  0,  0,  3,  0,  0,  0},     1.72e-6,   0.00e-6 ),
18762           new TERM(new int[]{ 0,  1,  0,  0,  1,  0,  0,  0},     1.41e-6,   0.01e-6 ),
18763           new TERM(new int[]{ 0,  1,  0,  0, -1,  0,  0,  0},     1.26e-6,   0.01e-6 ),
18764 
18765        /* 11-20 */
18766           new TERM(new int[]{ 1,  0,  0,  0, -1,  0,  0,  0},     0.63e-6,   0.00e-6 ),
18767           new TERM(new int[]{ 1,  0,  0,  0,  1,  0,  0,  0},     0.63e-6,   0.00e-6 ),
18768           new TERM(new int[]{ 0,  1,  2, -2,  3,  0,  0,  0},    -0.46e-6,   0.00e-6 ),
18769           new TERM(new int[]{ 0,  1,  2, -2,  1,  0,  0,  0},    -0.45e-6,   0.00e-6 ),
18770           new TERM(new int[]{ 0,  0,  4, -4,  4,  0,  0,  0},    -0.36e-6,   0.00e-6 ),
18771           new TERM(new int[]{ 0,  0,  1, -1,  1, -8, 12,  0},     0.24e-6,   0.12e-6 ),
18772           new TERM(new int[]{ 0,  0,  2,  0,  0,  0,  0,  0},    -0.32e-6,   0.00e-6 ),
18773           new TERM(new int[]{ 0,  0,  2,  0,  2,  0,  0,  0},    -0.28e-6,   0.00e-6 ),
18774           new TERM(new int[]{ 1,  0,  2,  0,  3,  0,  0,  0},    -0.27e-6,   0.00e-6 ),
18775           new TERM(new int[]{ 1,  0,  2,  0,  1,  0,  0,  0},    -0.26e-6,   0.00e-6 ),
18776 
18777        /* 21-30 */
18778           new TERM(new int[]{ 0,  0,  2, -2,  0,  0,  0,  0},     0.21e-6,   0.00e-6 ),
18779           new TERM(new int[]{ 0,  1, -2,  2, -3,  0,  0,  0},    -0.19e-6,   0.00e-6 ),
18780           new TERM(new int[]{ 0,  1, -2,  2, -1,  0,  0,  0},    -0.18e-6,   0.00e-6 ),
18781           new TERM(new int[]{ 0,  0,  0,  0,  0,  8,-13, -1},     0.10e-6,  -0.05e-6 ),
18782           new TERM(new int[]{ 0,  0,  0,  2,  0,  0,  0,  0},    -0.15e-6,   0.00e-6 ),
18783           new TERM(new int[]{ 2,  0, -2,  0, -1,  0,  0,  0},     0.14e-6,   0.00e-6 ),
18784           new TERM(new int[]{ 0,  1,  2, -2,  2,  0,  0,  0},     0.14e-6,   0.00e-6 ),
18785           new TERM(new int[]{ 1,  0,  0, -2,  1,  0,  0,  0},    -0.14e-6,   0.00e-6 ),
18786           new TERM(new int[]{ 1,  0,  0, -2, -1,  0,  0,  0},    -0.14e-6,   0.00e-6 ),
18787           new TERM(new int[]{ 0,  0,  4, -2,  4,  0,  0,  0},    -0.13e-6,   0.00e-6 ),
18788 
18789        /* 31-33 */
18790           new TERM(new int[]{ 0,  0,  2, -2,  4,  0,  0,  0},     0.11e-6,   0.00e-6 ),
18791           new TERM(new int[]{ 1,  0, -2,  0, -3,  0,  0,  0},    -0.11e-6,   0.00e-6 ),
18792           new TERM(new int[]{ 1,  0, -2,  0, -1,  0,  0,  0},    -0.11e-6,   0.00e-6 )
18793        };
18794 
18795     /* Terms of order t^1 */
18796        final TERM s1[] = {
18797 
18798        /* 1 - 3 */
18799           new TERM(new int[]{ 0,  0,  0,  0,  2,  0,  0,  0},    -0.07e-6,   3.57e-6 ),
18800           new TERM(new int[]{ 0,  0,  0,  0,  1,  0,  0,  0},     1.73e-6,  -0.03e-6 ),
18801           new TERM(new int[]{ 0,  0,  2, -2,  3,  0,  0,  0},     0.00e-6,   0.48e-6 )
18802        };
18803 
18804     /* Terms of order t^2 */
18805        final TERM s2[] = {
18806 
18807        /* 1-10 */
18808           new TERM(new int[]{ 0,  0,  0,  0,  1,  0,  0,  0},   743.52e-6,  -0.17e-6 ),
18809           new TERM(new int[]{ 0,  0,  2, -2,  2,  0,  0,  0},    56.91e-6,   0.06e-6 ),
18810           new TERM(new int[]{ 0,  0,  2,  0,  2,  0,  0,  0},     9.84e-6,  -0.01e-6 ),
18811           new TERM(new int[]{ 0,  0,  0,  0,  2,  0,  0,  0},    -8.85e-6,   0.01e-6 ),
18812           new TERM(new int[]{ 0,  1,  0,  0,  0,  0,  0,  0},    -6.38e-6,  -0.05e-6 ),
18813           new TERM(new int[]{ 1,  0,  0,  0,  0,  0,  0,  0},    -3.07e-6,   0.00e-6 ),
18814           new TERM(new int[]{ 0,  1,  2, -2,  2,  0,  0,  0},     2.23e-6,   0.00e-6 ),
18815           new TERM(new int[]{ 0,  0,  2,  0,  1,  0,  0,  0},     1.67e-6,   0.00e-6 ),
18816           new TERM(new int[]{ 1,  0,  2,  0,  2,  0,  0,  0},     1.30e-6,   0.00e-6 ),
18817           new TERM(new int[]{ 0,  1, -2,  2, -2,  0,  0,  0},     0.93e-6,   0.00e-6 ),
18818 
18819        /* 11-20 */
18820           new TERM(new int[]{ 1,  0,  0, -2,  0,  0,  0,  0},     0.68e-6,   0.00e-6 ),
18821           new TERM(new int[]{ 0,  0,  2, -2,  1,  0,  0,  0},    -0.55e-6,   0.00e-6 ),
18822           new TERM(new int[]{ 1,  0, -2,  0, -2,  0,  0,  0},     0.53e-6,   0.00e-6 ),
18823           new TERM(new int[]{ 0,  0,  0,  2,  0,  0,  0,  0},    -0.27e-6,   0.00e-6 ),
18824           new TERM(new int[]{ 1,  0,  0,  0,  1,  0,  0,  0},    -0.27e-6,   0.00e-6 ),
18825           new TERM(new int[]{ 1,  0, -2, -2, -2,  0,  0,  0},    -0.26e-6,   0.00e-6 ),
18826           new TERM(new int[]{ 1,  0,  0,  0, -1,  0,  0,  0},    -0.25e-6,   0.00e-6 ),
18827           new TERM(new int[]{ 1,  0,  2,  0,  1,  0,  0,  0},     0.22e-6,   0.00e-6 ),
18828           new TERM(new int[]{ 2,  0,  0, -2,  0,  0,  0,  0},    -0.21e-6,   0.00e-6 ),
18829           new TERM(new int[]{ 2,  0, -2,  0, -1,  0,  0,  0},     0.20e-6,   0.00e-6 ),
18830 
18831        /* 21-25 */
18832           new TERM(new int[]{ 0,  0,  2,  2,  2,  0,  0,  0},     0.17e-6,   0.00e-6 ),
18833           new TERM(new int[]{ 2,  0,  2,  0,  2,  0,  0,  0},     0.13e-6,   0.00e-6 ),
18834           new TERM(new int[]{ 2,  0,  0,  0,  0,  0,  0,  0},    -0.13e-6,   0.00e-6 ),
18835           new TERM(new int[]{ 1,  0,  2, -2,  2,  0,  0,  0},    -0.12e-6,   0.00e-6 ),
18836           new TERM(new int[]{ 0,  0,  2,  0,  0,  0,  0,  0},    -0.11e-6,   0.00e-6 )
18837        };
18838 
18839     /* Terms of order t^3 */
18840        final TERM s3[] = {
18841 
18842        /* 1-4 */
18843           new TERM(new int[]{ 0,  0,  0,  0,  1,  0,  0,  0},     0.30e-6, -23.42e-6 ),
18844           new TERM(new int[]{ 0,  0,  2, -2,  2,  0,  0,  0},    -0.03e-6,  -1.46e-6 ),
18845           new TERM(new int[]{ 0,  0,  2,  0,  2,  0,  0,  0},    -0.01e-6,  -0.25e-6 ),
18846           new TERM(new int[]{ 0,  0,  0,  0,  2,  0,  0,  0},     0.00e-6,   0.23e-6 )
18847        };
18848 
18849     /* Terms of order t^4 */
18850        final TERM s4[] = {
18851 
18852        /* 1-1 */
18853           new TERM(new int[]{ 0,  0,  0,  0,  1,  0,  0,  0},    -0.26e-6,  -0.01e-6 )
18854        };
18855 
18856     /* Number of terms in the series */
18857        final int NS0 = s0.length;
18858        final int NS1 = s1.length;
18859        final int NS2 = s2.length;
18860        final int NS3 = s3.length;
18861        final int NS4 = s4.length;
18862 
18863     /*--------------------------------------------------------------------*/
18864 
18865     /* Interval between fundamental epoch J2000.0 and current date (JC). */
18866        t = ((date1 - DJ00) + date2) / DJC;
18867 
18868     /* Fundamental Arguments (from IERS Conventions 2003) */
18869 
18870     /* Mean anomaly of the Moon. */
18871        fa[0] = jauFal03(t);
18872 
18873     /* Mean anomaly of the Sun. */
18874        fa[1] = jauFalp03(t);
18875 
18876     /* Mean longitude of the Moon minus that of the ascending node. */
18877        fa[2] = jauFaf03(t);
18878 
18879     /* Mean elongation of the Moon from the Sun. */
18880        fa[3] = jauFad03(t);
18881 
18882     /* Mean longitude of the ascending node of the Moon. */
18883        fa[4] = jauFaom03(t);
18884 
18885     /* Mean longitude of Venus. */
18886        fa[5] = jauFave03(t);
18887 
18888     /* Mean longitude of Earth. */
18889        fa[6] = jauFae03(t);
18890 
18891     /* General precession in longitude. */
18892        fa[7] = jauFapa03(t);
18893 
18894     /* Evaluate s. */
18895        w0 = sp[0];
18896        w1 = sp[1];
18897        w2 = sp[2];
18898        w3 = sp[3];
18899        w4 = sp[4];
18900        w5 = sp[5];
18901 
18902        for (i = NS0-1; i >= 0; i--) {
18903        a = 0.0;
18904        for (j = 0; j < 8; j++) {
18905           a += (double)s0[i].nfa[j] * fa[j];
18906        }
18907        w0 += s0[i].s * sin(a) + s0[i].c * cos(a);
18908        }
18909 
18910        for (i = NS1-1; i >= 0; i--) {
18911           a = 0.0;
18912           for (j = 0; j < 8; j++) {
18913              a += (double)s1[i].nfa[j] * fa[j];
18914           }
18915           w1 += s1[i].s * sin(a) + s1[i].c * cos(a);
18916        }
18917 
18918        for (i = NS2-1; i >= 0; i--) {
18919           a = 0.0;
18920           for (j = 0; j < 8; j++) {
18921              a += (double)s2[i].nfa[j] * fa[j];
18922           }
18923           w2 += s2[i].s * sin(a) + s2[i].c * cos(a);
18924        }
18925 
18926        for (i = NS3-1; i >= 0; i--) {
18927           a = 0.0;
18928           for (j = 0; j < 8; j++) {
18929              a += (double)s3[i].nfa[j] * fa[j];
18930           }
18931           w3 += s3[i].s * sin(a) + s3[i].c * cos(a);
18932        }
18933 
18934        for (i = NS4-1; i >= 0; i--) {
18935           a = 0.0;
18936           for (j = 0; j < 8; j++) {
18937              a += (double)s4[i].nfa[j] * fa[j];
18938           }
18939           w4 += s4[i].s * sin(a) + s4[i].c * cos(a);
18940        }
18941 
18942        s = (w0 +
18943            (w1 +
18944            (w2 +
18945            (w3 +
18946            (w4 +
18947             w5 * t) * t) * t) * t) * t) * DAS2R - x*y/2.0;
18948 
18949        return s;
18950 
18951         }
18952     
18953 
18954     /**
18955     *  The CIO locator s, positioning the Celestial Intermediate Origin on
18956     *  the equator of the Celestial Intermediate Pole, using the IAU 2006
18957     *  precession and IAU 2000A nutation models.
18958     *
18959     *<p>This function is derived from the International Astronomical Union's
18960     *  SOFA (Standards Of Fundamental Astronomy) software collection.
18961     *
18962     *<p>Status:  support function.
18963     *
18964     *<!-- Given: -->
18965     *     @param date1 double TT as a 2-part Julian Date (Note 1)
18966     *     @param date2 double TT as a 2-part Julian Date (Note 1)
18967     *
18968     * <!-- Returned (function value): -->
18969     *  @return double    the CIO locator s in radians (Note 2)
18970     *
18971     * <p>Notes:
18972     * <ol>
18973     *
18974     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
18975     *     convenient way between the two arguments.  For example,
18976     *     JD(TT)=2450123.7 could be expressed in any of these ways,
18977     *     among others:
18978     *<pre>
18979     *            date1          date2
18980     *
18981     *         2450123.7           0.0       (JD method)
18982     *         2451545.0       -1421.3       (J2000 method)
18983     *         2400000.5       50123.2       (MJD method)
18984     *         2450123.5           0.2       (date &amp; time method)
18985     *</pre>
18986     *     The JD method is the most natural and convenient to use in
18987     *     cases where the loss of several decimal digits of resolution
18988     *     is acceptable.  The J2000 method is best matched to the way
18989     *     the argument is handled internally and will deliver the
18990     *     optimum resolution.  The MJD method and the date &amp; time methods
18991     *     are both good compromises between resolution and convenience.
18992     *
18993     * <li> The CIO locator s is the difference between the right ascensions
18994     *     of the same point in two systems.  The two systems are the GCRS
18995     *     and the CIP,CIO, and the point is the ascending node of the
18996     *     CIP equator.  The CIO locator s remains a small fraction of
18997     *     1 arcsecond throughout 1900-2100.
18998     *
18999     * <li> The series used to compute s is in fact for s+XY/2, where X and Y
19000     *     are the x and y components of the CIP unit vector;  this series is
19001     *     more compact than a direct series for s would be.  The present
19002     *     function uses the full IAU 2000A nutation model when predicting
19003     *     the CIP position.
19004     *</ol>
19005     *<p>Called:<ul>
19006     *     <li>{@link #jauPnm06a} classical NPB matrix, IAU 2006/2000A
19007     *     <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
19008     *     <li>{@link #jauS06} the CIO locator s, given X,Y, IAU 2006
19009     * </ul>
19010     *<p>References:
19011     *
19012     *    <p>Capitaine, N., Chapront, J., Lambert, S. and Wallace, P.,
19013     *     "Expressions for the Celestial Intermediate Pole and Celestial
19014     *     Ephemeris Origin consistent with the IAU 2000A precession-
19015     *     nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
19016     *
19017     *     n.b. The celestial ephemeris origin (CEO) was renamed "celestial
19018     *          intermediate origin" (CIO) by IAU 2006 Resolution 2.
19019     *
19020     *    <p>Capitaine, N. &amp; Wallace, P.T., 2006, Astron.Astrophys. 450, 855
19021     *
19022     *     <p>McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003),
19023     *     IERS Technical Note No. 32, BKG
19024     *
19025     *    <p>Wallace, P.T. &amp; Capitaine, N., 2006, Astron.Astrophys. 459, 981
19026     *
19027     *@version 2010 January 18
19028     *
19029     *  @since Release 20101201
19030     *
19031     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
19032     */
19033     public static double jauS06a(double date1, double date2)
19034     {
19035        double rnpb[][] = new double[3][3], s;
19036 
19037 
19038     /* Bias-precession-nutation-matrix, IAU 20006/2000A. */
19039        rnpb = jauPnm06a(date1, date2);
19040 
19041     /* Extract the CIP coordinates. */
19042        CelestialIntermediatePole cip = jauBpn2xy(rnpb);
19043 
19044     /* Compute the CIO locator s, given the CIP coordinates. */
19045        s = jauS06(date1, date2, cip.x, cip.y);
19046 
19047        return s;
19048 
19049         }
19050     
19051 
19052     /**
19053     *  Convert spherical coordinates to Cartesian.
19054     *
19055     *<p>This function is derived from the International Astronomical Union's
19056     *  SOFA (Standards Of Fundamental Astronomy) software collection.
19057     *
19058     *<p>Status:  vector/matrix support function.
19059     *
19060     *<!-- Given: -->
19061     *     @param theta     double        longitude angle (radians)
19062     *     @param phi       double        latitude angle (radians)
19063     *
19064     *<!-- Returned: -->
19065     *     @return c         double[3]      <u>returned</u> direction cosines
19066     *
19067     *@version 2008 October 28
19068     *
19069     *  @since Release 20101201
19070     *
19071     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
19072     */
19073     public static double[] jauS2c(double theta, double phi )
19074     {
19075        double cp, c[] = new double[3];
19076 
19077 
19078        cp = cos(phi);
19079        c[0] = cos(theta) * cp;
19080        c[1] = sin(theta) * cp;
19081        c[2] = sin(phi);
19082 
19083        return c;
19084 
19085         }
19086     
19087 
19088     /**
19089     *  Convert spherical polar coordinates to p-vector.
19090     *
19091     *<p>This function is derived from the International Astronomical Union's
19092     *  SOFA (Standards Of Fundamental Astronomy) software collection.
19093     *
19094     *<p>Status:  vector/matrix support function.
19095     *
19096     *<!-- Given: -->
19097     *     @param theta    double        longitude angle (radians)
19098     *     @param phi      double        latitude angle (radians)
19099     *     @param r        double        radial distance
19100     *
19101     *<!-- Returned: -->
19102     *     @return p        double[3]      <u>returned</u> Cartesian coordinates
19103     *
19104     *<p>Called:<ul>
19105     *     <li>{@link #jauS2c} spherical coordinates to unit vector
19106     *     <li>{@link #jauSxp} multiply p-vector by scalar
19107     * </ul>
19108     *@version 2008 May 11
19109     *
19110     *  @since Release 20101201
19111     *
19112     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
19113     */
19114     public static double[] jauS2p(double theta, double phi, double r )
19115     {
19116        double p[];
19117        double u[] = new double[3];
19118 
19119 
19120        u = jauS2c(theta,phi);
19121        p = jauSxp(r,u);
19122 
19123        return p;
19124 
19125         }
19126     
19127 
19128     /**
19129     *  Convert position/velocity from spherical to Cartesian coordinates.
19130     *
19131     *<p>This function is derived from the International Astronomical Union's
19132     *  SOFA (Standards Of Fundamental Astronomy) software collection.
19133     *
19134     *<p>Status:  vector/matrix support function.
19135     *
19136     *<!-- Given: -->
19137     *     @param theta     double           longitude angle (radians)
19138     *     @param phi       double           latitude angle (radians)
19139     *     @param r         double           radial distance
19140     *     @param td        double           rate of change of theta
19141     *     @param pd        double           rate of change of phi
19142     *     @param rd        double           rate of change of r
19143     *
19144     *<!-- Returned: -->
19145     *     @return pv        double[2][3]      <u>returned</u> pv-vector
19146     *
19147     *@version 2008 May 25
19148     *
19149     *  @since Release 20101201
19150     *
19151     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
19152     */
19153     public static double[][] jauS2pv(double theta, double phi, double r,
19154                  double td, double pd, double rd)
19155     {
19156        double pv[][] = new double[2][3];
19157        double st, ct, sp, cp, rcp, x, y, rpd, w;
19158 
19159 
19160        st = sin(theta);
19161        ct = cos(theta);
19162        sp = sin(phi);
19163        cp = cos(phi);
19164        rcp = r * cp;
19165        x = rcp * ct;
19166        y = rcp * st;
19167        rpd = r * pd;
19168        w = rpd*sp - cp*rd;
19169 
19170        pv[0][0] = x;
19171        pv[0][1] = y;
19172        pv[0][2] = r * sp;
19173        pv[1][0] = -y*td - w*ct;
19174        pv[1][1] =  x*td - w*st;
19175        pv[1][2] = rpd*cp + sp*rd;
19176 
19177        return pv;
19178 
19179         }
19180     
19181 
19182     /**
19183     *  Multiply a pv-vector by two scalars.
19184     *
19185     *<p>This function is derived from the International Astronomical Union's
19186     *  SOFA (Standards Of Fundamental Astronomy) software collection.
19187     *
19188     *<p>Status:  vector/matrix support function.
19189     *
19190     *<!-- Given: -->
19191     *     @param s1      double          scalar to multiply position component by
19192     *     @param s2      double          scalar to multiply velocity component by
19193     *     @param pv      double[2][3]    pv-vector
19194     *
19195     *<!-- Returned: -->
19196     *     @return spv     double[2][3]     <u>returned</u> pv-vector: p scaled by s1, v scaled by s2
19197     *
19198     *  Note:
19199     *     It is permissible for pv and spv to be the same array.
19200     *
19201     *<p>Called:<ul>
19202     *     <li>{@link #jauSxp} multiply p-vector by scalar
19203     * </ul>
19204     *@version 2008 October 28
19205     *
19206     *  @since Release 20101201
19207     *
19208     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
19209     */
19210     public static double[][] jauS2xpv(double s1, double s2, double pv[][])
19211     {
19212         double spv[][] = new double[2][3];
19213         spv[0] = jauSxp(s1, pv[0]);
19214         spv[1] =jauSxp(s2, pv[1]);
19215 
19216        return spv;
19217 
19218         }
19219     
19220 
19221     /**
19222     *  Angular separation between two p-vectors.
19223     *
19224     *<p>This function is derived from the International Astronomical Union's
19225     *  SOFA (Standards Of Fundamental Astronomy) software collection.
19226     *
19227     *<p>Status:  vector/matrix support function.
19228     *
19229     *<!-- Given: -->
19230     *     @param a       double[3]     first p-vector (not necessarily unit length)
19231     *     @param b       double[3]     second p-vector (not necessarily unit length)
19232     *
19233     * <!-- Returned (function value): -->
19234     *  @return double       angular separation (radians, always positive)
19235     *
19236     * <p>Notes:
19237     * <ol>
19238     *
19239     * <li> If either vector is null, a zero result is returned.
19240     *
19241     * <li> The angular separation is most simply formulated in terms of
19242     *     scalar product.  However, this gives poor accuracy for angles
19243     *     near zero and pi.  The present algorithm uses both cross product
19244     *     and dot product, to deliver full accuracy whatever the size of
19245     *     the angle.
19246     *</ol>
19247     *<p>Called:<ul>
19248     *     <li>{@link #jauPxp} vector product of two p-vectors
19249     *     <li>{@link #jauPm} modulus of p-vector
19250     *     <li>{@link #jauPdp} scalar product of two p-vectors
19251     * </ul>
19252     *@version 2008 May 22
19253     *
19254     *  @since Release 20101201
19255     *
19256     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
19257     */
19258     public static double jauSepp(double a[] , double b[] )
19259     {
19260        double axb[] = new double[3], ss, cs, s;
19261 
19262 
19263     /* Sine of angle between the vectors, multiplied by the two moduli. */
19264        axb = jauPxp(a,b);
19265        ss = jauPm(axb);
19266 
19267     /* Cosine of the angle, multiplied by the two moduli. */
19268        cs = jauPdp(a, b);
19269 
19270     /* The angle. */
19271        s = ((ss != 0.0) || (cs != 0.0)) ? atan2(ss, cs) : 0.0;
19272 
19273        return s;
19274 
19275         }
19276     
19277 
19278     /**
19279     *  Angular separation between two sets of spherical coordinates.
19280     *
19281     *<p>This function is derived from the International Astronomical Union's
19282     *  SOFA (Standards Of Fundamental Astronomy) software collection.
19283     *
19284     *<p>Status:  vector/matrix support function.
19285     *
19286     *<!-- Given: -->
19287     *     @param al      double        first longitude (radians)
19288     *     @param ap      double        first latitude (radians)
19289     *     @param bl      double        second longitude (radians)
19290     *     @param bp      double        second latitude (radians)
19291     *
19292     * <!-- Returned (function value): -->
19293     *  @return double       angular separation (radians)
19294     *
19295     *<p>Called:<ul>
19296     *     <li>{@link #jauS2c} spherical coordinates to unit vector
19297     *     <li>{@link #jauSepp} angular separation between two p-vectors
19298     * </ul>
19299     *@version 2008 May 16
19300     *
19301     *  @since Release 20101201
19302     *
19303     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
19304     */
19305     public static double jauSeps(double al, double ap, double bl, double bp)
19306     {
19307        double ac[] = new double[3], bc[] = new double[3], s;
19308 
19309 
19310     /* Spherical to Cartesian. */
19311        ac = jauS2c(al,ap);
19312        bc = jauS2c(bl,bp);
19313 
19314     /* Angle between the vectors. */
19315        s = jauSepp(ac, bc);
19316 
19317        return s;
19318 
19319         }
19320     
19321 
19322     /**
19323     *  The TIO locator s', positioning the Terrestrial Intermediate Origin
19324     *  on the equator of the Celestial Intermediate Pole.
19325     *
19326     *<p>This function is derived from the International Astronomical Union's
19327     *  SOFA (Standards Of Fundamental Astronomy) software collection.
19328     *
19329     *<p>Status:  canonical model.
19330     *
19331     *<!-- Given: -->
19332     *     @param date1 double TT as a 2-part Julian Date (Note 1)
19333     *     @param date2 double TT as a 2-part Julian Date (Note 1)
19334     *
19335     * <!-- Returned (function value): -->
19336     *  @return double    the TIO locator s' in radians (Note 2)
19337     *
19338     * <p>Notes:
19339     * <ol>
19340     *
19341     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
19342     *     convenient way between the two arguments.  For example,
19343     *     JD(TT)=2450123.7 could be expressed in any of these ways,
19344     *     among others:
19345     *<pre>
19346     *            date1          date2
19347     *
19348     *         2450123.7           0.0       (JD method)
19349     *         2451545.0       -1421.3       (J2000 method)
19350     *         2400000.5       50123.2       (MJD method)
19351     *         2450123.5           0.2       (date &amp; time method)
19352     *</pre>
19353     *     The JD method is the most natural and convenient to use in
19354     *     cases where the loss of several decimal digits of resolution
19355     *     is acceptable.  The J2000 method is best matched to the way
19356     *     the argument is handled internally and will deliver the
19357     *     optimum resolution.  The MJD method and the date &amp; time methods
19358     *     are both good compromises between resolution and convenience.
19359     *
19360     * <li> The TIO locator s' is obtained from polar motion observations by
19361     *     numerical integration, and so is in essence unpredictable.
19362     *     However, it is dominated by a secular drift of about
19363     *     47 microarcseconds per century, which is the approximation
19364     *     evaluated by the present function.
19365     *</ol>
19366     *<p>Reference:
19367     *
19368     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
19369     *     IERS Technical Note No. 32, BKG (2004)
19370     *
19371     *@version 2008 May 24
19372     *
19373     *  @since Release 20101201
19374     *
19375     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
19376     */
19377     public static double jauSp00(double date1, double date2)
19378     {
19379        double t, sp;
19380 
19381 
19382     /* Interval between fundamental epoch J2000.0 and current date (JC). */
19383        t = ((date1 - DJ00) + date2) / DJC;
19384 
19385     /* Approximate s'. */
19386        sp = -47e-6 * t * DAS2R;
19387 
19388        return sp;
19389 
19390         }
19391     
19392 
19393     /**
19394     *  Star proper motion:  update star catalog data for space motion.
19395     *
19396     *<p>This function is derived from the International Astronomical Union's
19397     *  SOFA (Standards Of Fundamental Astronomy) software collection.
19398     *
19399     *<p>Status:  support function.
19400     *
19401     *<!-- Given: -->
19402     *     @param ra1     double      right ascension (radians), before
19403     *     @param dec1    double      declination (radians), before
19404     *     @param pmr1    double      RA proper motion (radians/year), before
19405     *     @param pmd1    double      Dec proper motion (radians/year), before
19406     *     @param px1     double      parallax (arcseconds), before
19407     *     @param rv1     double      radial velocity (km/s, +ve = receding), before
19408     *     @param ep1a    double      "before" epoch, part A (Note 1)
19409     *     @param ep1b    double      "before" epoch, part B (Note 1)
19410     *     @param ep2a    double      "after" epoch, part A (Note 1)
19411     *     @param ep2b    double      "after" epoch, part B (Note 1)
19412     *
19413     *<!-- Returned: -->
19414     *     @return ra2     double       <u>returned</u> right ascension (radians), after
19415     *             dec2    double       <u>returned</u> declination (radians), after
19416     *             pmr2    double       <u>returned</u> RA proper motion (radians/year), after
19417     *             pmd2    double       <u>returned</u> Dec proper motion (radians/year), after
19418     *             px2     double       <u>returned</u> parallax (arcseconds), after
19419     *             rv2     double       <u>returned</u> radial velocity (km/s, +ve = receding), after
19420     *
19421     * <!-- Returned (function value): -->
19422     *  @return int        status:
19423     *                          -1 = system error (should not occur)
19424     *                           0 = no warnings or errors
19425     *                           1 = distance overridden (Note 6)
19426     *                           2 = excessive velocity (Note 7)
19427     *                           4 = solution didn't converge (Note 8)
19428     *                        else = binary logical OR of the above warnings
19429     *FIXME need to return the status as well.
19430     * <p>Notes:
19431     * <ol>
19432     *
19433     * <li> The starting and ending TDB dates ep1a+ep1b and ep2a+ep2b are
19434     *     Julian Dates, apportioned in any convenient way between the two
19435     *     parts (A and B).  For example, JD(TDB)=2450123.7 could be
19436     *     expressed in any of these ways, among others:
19437     *<pre>
19438     *             epna          epnb
19439     *
19440     *         2450123.7           0.0       (JD method)
19441     *         2451545.0       -1421.3       (J2000 method)
19442     *         2400000.5       50123.2       (MJD method)
19443     *         2450123.5           0.2       (date &amp; time method)
19444     *</pre>
19445     *     The JD method is the most natural and convenient to use in
19446     *     cases where the loss of several decimal digits of resolution
19447     *     is acceptable.  The J2000 method is best matched to the way
19448     *     the argument is handled internally and will deliver the
19449     *     optimum resolution.  The MJD method and the date &amp; time methods
19450     *     are both good compromises between resolution and convenience.
19451     *
19452     * <li> In accordance with normal star-catalog conventions, the object's
19453     *     right ascension and declination are freed from the effects of
19454     *     secular aberration.  The frame, which is aligned to the catalog
19455     *     equator and equinox, is Lorentzian and centered on the SSB.
19456     *
19457     *     The proper motions are the rate of change of the right ascension
19458     *     and declination at the catalog epoch and are in radians per TDB
19459     *     Julian year.
19460     *
19461     *     The parallax and radial velocity are in the same frame.
19462     *
19463     * <li> Care is needed with units.  The star coordinates are in radians
19464     *     and the proper motions in radians per Julian year, but the
19465     *     parallax is in arcseconds.
19466     *
19467     * <li> The RA proper motion is in terms of coordinate angle, not true
19468     *     angle.  If the catalog uses arcseconds for both RA and Dec proper
19469     *     motions, the RA proper motion will need to be divided by cos(Dec)
19470     *     before use.
19471     *
19472     * <li> Straight-line motion at constant speed, in the inertial frame,
19473     *     is assumed.
19474     *
19475     * <li> An extremely small (or zero or negative) parallax is interpreted
19476     *     to mean that the object is on the "celestial sphere", the radius
19477     *     of which is an arbitrary (large) value (see the jauStarpv
19478     *     function for the value used).  When the distance is overridden in
19479     *     this way, the status, initially zero, has 1 added to it.
19480     *
19481     * <li> If the space velocity is a significant fraction of c (see the
19482     *     constant VMAX in the function jauStarpv),  it is arbitrarily set
19483     *     to zero.  When this action occurs, 2 is added to the status.
19484     *
19485     * <li> The relativistic adjustment carried out in the jauStarpv function
19486     *     involves an iterative calculation.  If the process fails to
19487     *     converge within a set number of iterations, 4 is added to the
19488     *     status.
19489     *</ol>
19490     *<p>Called:<ul>
19491     *     <li>{@link #jauStarpv} star catalog data to space motion pv-vector
19492     *     <li>{@link #jauPvu} update a pv-vector
19493     *     <li>{@link #jauPdp} scalar product of two p-vectors
19494     *     <li>{@link #jauPvstar} space motion pv-vector to star catalog data
19495     * </ul>
19496     *@version 2008 May 16
19497     *
19498     *  @since Release 20101201
19499     *
19500     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
19501     */
19502     public static CatalogCoords jauStarpm(double ra1, double dec1,
19503                   double pmr1, double pmd1, double px1, double rv1,
19504                   double ep1a, double ep1b, double ep2a, double ep2b) throws JSOFAInternalError
19505     {
19506        double pv1[][] = new double[2][3], tl1, dt, pv[][] = new double[2][3], r2, rdv, v2, c2mv2, tl2,
19507               pv2[][] = new double[2][3];
19508        jauStarpv(ra1, dec1, pmr1, pmd1, px1, rv1, pv1);
19509 
19510     /* Light time when observed (days). */
19511        tl1 = jauPm(pv1[0]) / DC;
19512 
19513     /* Time interval, "before" to "after" (days). */
19514        dt = (ep2a - ep1a) + (ep2b - ep1b);
19515 
19516     /* Move star along track from the "before" observed position to the */
19517     /* "after" geometric position. */
19518        pv = jauPvu(dt + tl1, pv1);
19519 
19520     /* From this geometric position, deduce the observed light time (days) */
19521     /* at the "after" epoch (with theoretically unneccessary error check). */
19522        r2 = jauPdp(pv[0], pv[0]);
19523        rdv = jauPdp(pv[0], pv[1]);
19524        v2 = jauPdp(pv[1], pv[1]);
19525        c2mv2 = DC*DC - v2;
19526        if (c2mv2 <=  0) throw new JSOFAInternalError("internal error", -1);
19527        tl2 = (-rdv + sqrt(rdv*rdv + c2mv2*r2)) / c2mv2;
19528 
19529     /* Move the position along track from the observed place at the */
19530     /* "before" epoch to the observed place at the "after" epoch. */
19531        pv2 =jauPvu(dt + (tl1 - tl2), pv1 );
19532 
19533     /* Space motion pv-vector to RA,Dec etc. at the "after" epoch. */
19534        CatalogCoords cat = jauPvstar(pv2);
19535 
19536        return cat;
19537 
19538         }
19539     
19540 
19541     /**
19542     *  Convert star catalog coordinates to position+velocity vector.
19543     *
19544     *<p>This function is derived from the International Astronomical Union's
19545     *  SOFA (Standards Of Fundamental Astronomy) software collection.
19546     *
19547     *<p>Status:  support function.
19548     *
19549     *  Given (Note 1):
19550     *     ra     double        right ascension (radians)
19551     *     dec    double        declination (radians)
19552     *     pmr    double        RA proper motion (radians/year)
19553     *     pmd    double        Dec proper motion (radians/year)
19554     *     px     double        parallax (arcseconds)
19555     *     rv     double        radial velocity (km/s, positive = receding)
19556     *
19557     *  Returned (Note 2):
19558     *     pv     double[2][3]  pv-vector (AU, AU/day)
19559     *
19560     * <!-- Returned (function value): -->
19561     *  @return int           status:
19562     *                              0 = no warnings
19563     *                              1 = distance overridden (Note 6)
19564     *                              2 = excessive speed (Note 7)
19565     *                              4 = solution didn't converge (Note 8)
19566     *                           else = binary logical OR of the above
19567     *
19568     * <p>Notes:
19569     * <ol>
19570     *
19571     * <li> The star data accepted by this function are "observables" for an
19572     *     imaginary observer at the solar-system barycenter.  Proper motion
19573     *     and radial velocity are, strictly, in terms of barycentric
19574     *     coordinate time, TCB.  For most practical applications, it is
19575     *     permissible to neglect the distinction between TCB and ordinary
19576     *     "proper" time on Earth (TT/TAI).  The result will, as a rule, be
19577     *     limited by the intrinsic accuracy of the proper-motion and
19578     *     radial-velocity data;  moreover, the pv-vector is likely to be
19579     *     merely an intermediate result, so that a change of time unit
19580     *     would cancel out overall.
19581     *
19582     *     In accordance with normal star-catalog conventions, the object's
19583     *     right ascension and declination are freed from the effects of
19584     *     secular aberration.  The frame, which is aligned to the catalog
19585     *     equator and equinox, is Lorentzian and centered on the SSB.
19586     *
19587     * <li> The resulting position and velocity pv-vector is with respect to
19588     *     the same frame and, like the catalog coordinates, is freed from
19589     *     the effects of secular aberration.  Should the "coordinate
19590     *     direction", where the object was located at the catalog epoch, be
19591     *     required, it may be obtained by calculating the magnitude of the
19592     *     position vector pv[0][0-2] dividing by the speed of light in
19593     *     AU/day to give the light-time, and then multiplying the space
19594     *     velocity pv[1][0-2] by this light-time and adding the result to
19595     *     pv[0][0-2].
19596     *
19597     *     Summarizing, the pv-vector returned is for most stars almost
19598     *     identical to the result of applying the standard geometrical
19599     *     "space motion" transformation.  The differences, which are the
19600     *     subject of the Stumpff paper referenced below, are:
19601     *
19602     *     (i) In stars with significant radial velocity and proper motion,
19603     *     the constantly changing light-time distorts the apparent proper
19604     *     motion.  Note that this is a classical, not a relativistic,
19605     *     effect.
19606     *
19607     *     (ii) The transformation complies with special relativity.
19608     *
19609     * <li> Care is needed with units.  The star coordinates are in radians
19610     *     and the proper motions in radians per Julian year, but the
19611     *     parallax is in arcseconds; the radial velocity is in km/s, but
19612     *     the pv-vector result is in AU and AU/day.
19613     *
19614     * <li> The RA proper motion is in terms of coordinate angle, not true
19615     *     angle.  If the catalog uses arcseconds for both RA and Dec proper
19616     *     motions, the RA proper motion will need to be divided by cos(Dec)
19617     *     before use.
19618     *
19619     * <li> Straight-line motion at constant speed, in the inertial frame,
19620     *     is assumed.
19621     *
19622     * <li> An extremely small (or zero or negative) parallax is interpreted
19623     *     to mean that the object is on the "celestial sphere", the radius
19624     *     of which is an arbitrary (large) value (see the constant PXMIN).
19625     *     When the distance is overridden in this way, the status,
19626     *     initially zero, has 1 added to it.
19627     *
19628     * <li> If the space velocity is a significant fraction of c (see the
19629     *     constant VMAX), it is arbitrarily set to zero.  When this action
19630     *     occurs, 2 is added to the status.
19631     *
19632     * <li> The relativistic adjustment involves an iterative calculation.
19633     *     If the process fails to converge within a set number (IMAX) of
19634     *     iterations, 4 is added to the status.
19635     *
19636     * <li> The inverse transformation is performed by the function
19637     *     jauPvstar.
19638     *</ol>
19639     *<p>Called:<ul>
19640     *     <li>{@link #jauS2pv} spherical coordinates to pv-vector
19641     *     <li>{@link #jauPm} modulus of p-vector
19642     *     <li>{@link #jauZp} zero p-vector
19643     *     <li>{@link #jauPn} decompose p-vector into modulus and direction
19644     *     <li>{@link #jauPdp} scalar product of two p-vectors
19645     *     <li>{@link #jauSxp} multiply p-vector by scalar
19646     *     <li>{@link #jauPmp} p-vector minus p-vector
19647     *     <li>{@link #jauPpp} p-vector plus p-vector
19648     * </ul>
19649     *<p>Reference:
19650     *
19651     *     Stumpff, P., 1985, Astron.Astrophys. 144, 232-240.
19652     *
19653     *@version 2009 July 6
19654     *
19655     *  @since Release 20101201
19656     *
19657     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
19658     */
19659     public static int jauStarpv(double ra, double dec,
19660                   double pmr, double pmd, double px, double rv,
19661                   double pv[][])
19662     {
19663     /* Smallest allowed parallax */
19664        final double PXMIN = 1e-7;
19665 
19666     /* Largest allowed speed (fraction of c) */
19667        final double VMAX = 0.5;
19668 
19669     /* Maximum number of iterations for relativistic solution */
19670        final int IMAX = 100;
19671 
19672        int i, iwarn;
19673        double w, r, rd, rad, decd, v, x[] = new double[3], usr[] = new double[3], ust[] = new double[3],
19674               vsr, vst, betst, betsr, bett, betr,
19675               dd, ddel, ur[] = new double[3], ut[] = new double[3],
19676               d = 0.0, del = 0.0,       /* to prevent */
19677               odd = 0.0, oddel = 0.0,   /* compiler   */
19678               od = 0.0, odel = 0.0;     /* warnings   */
19679 
19680 
19681     /* Distance (AU). */
19682        if (px >= PXMIN) {
19683           w = px;
19684           iwarn = 0;
19685        } else {
19686           w = PXMIN;
19687           iwarn = 1;
19688        }
19689        r = DR2AS / w;
19690 
19691     /* Radial velocity (AU/day). */
19692        rd = DAYSEC * rv * 1e3 / DAU;
19693 
19694     /* Proper motion (radian/day). */
19695        rad = pmr / DJY;
19696        decd = pmd / DJY;
19697 
19698     /* To pv-vector (AU,AU/day). */
19699        double[][] pvt = jauS2pv(ra, dec, r, rad, decd, rd);
19700        jauCpv(pvt,pv);
19701 
19702     /* If excessive velocity, arbitrarily set it to zero. */
19703        v = jauPm(pv[1]);
19704        if (v / DC > VMAX) {
19705           jauZp(pv[1]);
19706           iwarn += 2;
19707        }
19708 
19709     /* Isolate the radial component of the velocity (AU/day). */
19710        NormalizedVector nv = jauPn(pv[0]);
19711        w = nv.r;
19712        x = nv.u;
19713        vsr = jauPdp(x, pv[1]);
19714        usr = jauSxp(vsr,x);
19715 
19716     /* Isolate the transverse component of the velocity (AU/day). */
19717        ust = jauPmp(pv[1], usr);
19718        vst = jauPm(ust);
19719 
19720     /* Special-relativity dimensionless parameters. */
19721        betsr = vsr / DC;
19722        betst = vst / DC;
19723 
19724     /* Determine the inertial-to-observed relativistic correction terms. */
19725        bett = betst;
19726        betr = betsr;
19727        for (i = 0; i < IMAX; i++) {
19728           d = 1.0 + betr;
19729           del = sqrt(1.0 - betr*betr - bett*bett) - 1.0;
19730           betr = d * betsr + del;
19731           bett = d * betst;
19732           if (i > 0) {
19733              dd = abs(d - od);
19734              ddel = abs(del - odel);
19735              if ((i > 1) && (dd >= odd) && (ddel >= oddel)) break;
19736              odd = dd;
19737              oddel = ddel;
19738           }
19739           od = d;
19740           odel = del;
19741        }
19742        if (i >= IMAX) iwarn += 4;
19743 
19744     /* Replace observed radial velocity with inertial value. */
19745        w = (betsr != 0.0) ? d + del / betsr : 1.0;
19746        ur = jauSxp(w,usr);
19747 
19748     /* Replace observed tangential velocity with inertial value. */
19749        ut = jauSxp(d,ust);
19750 
19751     /* Combine the two to obtain the inertial space velocity. */
19752        pv[1] = jauPpp(ur, ut);
19753        
19754     /* Return the status. */
19755        return iwarn;
19756 
19757         }
19758     
19759 
19760     /**
19761     *  Multiply a p-vector by a scalar.
19762     *
19763     *<p>This function is derived from the International Astronomical Union's
19764     *  SOFA (Standards Of Fundamental Astronomy) software collection.
19765     *
19766     *<p>Status:  vector/matrix support function.
19767     *
19768     *<!-- Given: -->
19769     *     @param s       double         scalar
19770     *     @param p       double[3]      p-vector
19771     *
19772     *<!-- Returned: -->
19773     *     @return sp      double[3]       <u>returned</u> s * p
19774     *
19775     * 
19776     *
19777     *@version 2008 October 28
19778     *
19779     *  @since Release 20101201
19780     *
19781     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
19782     */
19783     public static  double[] jauSxp(double s, double p[])
19784     {
19785        double sp[] = new double[3];
19786        sp[0] = s * p[0];
19787        sp[1] = s * p[1];
19788        sp[2] = s * p[2];
19789 
19790        return sp;
19791 
19792         }
19793     
19794 
19795     /**
19796     *  Multiply a pv-vector by a scalar.
19797     *
19798     *<p>This function is derived from the International Astronomical Union's
19799     *  SOFA (Standards Of Fundamental Astronomy) software collection.
19800     *
19801     *<p>Status:  vector/matrix support function.
19802     *
19803     *<!-- Given: -->
19804     *     @param s        double           scalar
19805     *     @param pv       double[2][3]     pv-vector
19806     *
19807     *<!-- Returned: -->
19808     *     @return spv      double[2][3]      <u>returned</u> s * pv
19809     *
19810     *  Note:
19811     *     It is permissible for pv and psv to be the same array
19812     *
19813     *<p>Called:<ul>
19814     *     <li>{@link #jauS2xpv} multiply pv-vector by two scalars
19815     * </ul>
19816     *@version 2008 October 28
19817     *
19818     *  @since Release 20101201
19819     *
19820     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
19821     */
19822     public static double[][] jauSxpv(double s, double pv[][])
19823     {
19824         double spv[][];
19825         spv = jauS2xpv(s, s, pv);
19826 
19827        return spv;
19828 
19829         }
19830 
19831     /**
19832      *
19833      *  Time scale transformation:  International Atomic Time, TAI, to
19834      *  Terrestrial Time, TT.
19835      *
19836      * <p>This function is derived from the International Astronomical Union's
19837      *  SOFA (Standards of Fundamental Astronomy) software collection.
19838      *
19839      *<p>Status:  canonical.
19840      *
19841      *<!-- Given: -->
19842      *  @param tai1 double    TAI as a 2-part Julian Date
19843      *  @param tai2 double    TAI as a 2-part Julian Date 
19844      *
19845      *<!-- Returned:-->
19846      *     @return JulianDate   TT as a 2-part Julian Date
19847      *
19848      *
19849      *  Note:
19850      *
19851      *     tai1+tai2 is Julian Date, apportioned in any convenient way
19852      *     between the two arguments, for example where tai1 is the Julian
19853      *     Day Number and tai2 is the fraction of a day.  The returned
19854      *     tt1,tt2 follow suit.
19855      *
19856      *<p>References:
19857      *
19858      *     McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
19859      *     IERS Technical Note No. 32, BKG (2004)
19860      *
19861      *     Explanatory Supplement to the Astronomical Almanac,
19862      *     P. Kenneth Seidelmann (ed), University Science Books (1992)
19863      *
19864      *@version 2010 May 16
19865      *
19866      *@since SOFA release 2010-12-01
19867      *
19868      *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
19869      */
19870     public static JulianDate jauTaitt(double tai1, double tai2)
19871     {
19872 
19873         double tt1, tt2;
19874         /* TT minus TAI (days). */
19875         final double dtat = TTMTAI / DAYSEC;
19876 
19877         /* Result, safeguarding precision. */
19878         
19879         if ( tai1 > tai2 ) {
19880             tt1 = tai1;
19881             tt2 = tai2 + dtat;
19882         } else {
19883             tt1 = tai1 + dtat;
19884             tt2 = tai2;
19885         }
19886 
19887 
19888         return new JulianDate(tt1, tt2);
19889     };   
19890 
19891     /**
19892      *
19893      *  Time scale transformation:  International Atomic Time, TAI, to
19894      *  Universal Time, UT1.
19895      *
19896      * <p>This function is derived from the International Astronomical Union's
19897      *  SOFA (Standards of Fundamental Astronomy) software collection.
19898      *
19899      *<p>Status:  canonical.
19900      *
19901      *<!-- Given: -->
19902      *  @param tai1 double    TAI as a 2-part Julian Date
19903      *  @param tai2 double    TAI as a 2-part Julian Date 
19904      *  @param   dta        double    UT1-TAI in seconds
19905      *
19906      *<!-- Returned:-->
19907      *  @return      UT1 as a 2-part Julian Date
19908      *
19909      *
19910      *<p>Notes:
19911      *  <ol>
19912      * <li>  tai1+tai2 is Julian Date, apportioned in any convenient way
19913      *     between the two arguments, for example where tai1 is the Julian
19914      *     Day Number and tai2 is the fraction of a day.  The returned
19915      *     UT11,UT12 follow suit.
19916      *
19917      *  <li>  The argument dta, i.e. UT1-TAI, is an observed quantity, and is
19918      *     available from IERS tabulations.
19919      *  </ol>
19920      *  Reference:
19921      *
19922      *     Explanatory Supplement to the Astronomical Almanac,
19923      *     P. Kenneth Seidelmann (ed), University Science Books (1992)
19924      *
19925      *@version 2010 May 16
19926      *
19927      *@since SOFA release 2010-12-01
19928      *
19929      *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
19930      *
19931      */
19932     public static JulianDate jauTaiut1(double tai1, double tai2, double dta)
19933 
19934     {
19935         double dtad,ut11, ut12;
19936 
19937 
19938         /* Result, safeguarding precision. */
19939         dtad = dta / DAYSEC;
19940         if ( tai1 > tai2 ) {
19941             ut11 = tai1;
19942             ut12 = tai2 + dtad;
19943         } else {
19944             ut11 = tai1 + dtad;
19945             ut12 = tai2;
19946         }
19947 
19948         return new JulianDate(ut11, ut12);
19949     };   
19950 
19951     /**
19952      *
19953      *  Time scale transformation:  International Atomic Time, TAI, to
19954      *  Coordinated Universal Time, UTC.
19955      *
19956      * <p>This function is derived from the International Astronomical Union's
19957      *  SOFA (Standards of Fundamental Astronomy) software collection.
19958      *
19959      *<p>Status:  canonical.
19960      *
19961      *<!-- Given: -->
19962      *  @param tai1 TAI as a 2-part Julian Date (Note 1)
19963      *  @param tai2 TAI as a 2-part Julian Date (Note 1) 
19964      *
19965      *<!-- Returned:-->
19966      *  @return   UTC as a 2-part quasi Julian Date (Notes 1-3)
19967      *
19968      *  Returned (function value):
19969      *                int      status: +1 = dubious year (Note 4)
19970      *                                  0 = OK
19971      *                                 -1 = unacceptable date
19972      *
19973      *<p>Notes:</p>
19974      * <ol>
19975      * <li>  tai1+tai2 is Julian Date, apportioned in any convenient way
19976      *     between the two arguments, for example where tai1 is the Julian
19977      *     Day Number and tai2 is the fraction of a day.  The returned utc1
19978      *     and utc2 form an analogous pair, except that a special convention
19979      *     is used, to deal with the problem of leap seconds - see the next
19980      *     note.
19981      *
19982      *  <li> JD cannot unambiguously represent UTC during a leap second unless
19983      *     special measures are taken.  The convention in the present
19984      *     function is that the JD day represents UTC days whether the
19985      *     length is 86399, 86400 or 86401 SI seconds.
19986      *
19987      *  <li> The function jauD2dtf can be used to transform the UTC quasi-JD
19988      *     into calendar date and clock time, including UTC leap second
19989      *     handling.
19990      *
19991      *  <li> The warning status "dubious year" flags UTCs that predate the
19992      *     introduction of the time scale and that are too far in the future
19993      *     to be trusted.  See jauDat for further details.
19994      *  </ol>
19995      *  Called:
19996      *  <ul>
19997      *     <li>{@link #jauJd2cal}    JD to Gregorian calendar
19998      *     <li>{@link #jauDat}       delta(AT) = TAI-UTC
19999      *     <li>{@link #jauCal2jd}    Gregorian calendar to JD
20000      *</ul>
20001      *<p>References:
20002      *
20003      *     McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
20004      *     IERS Technical Note No. 32, BKG (2004)
20005      *
20006      *     Explanatory Supplement to the Astronomical Almanac,
20007      *     P. Kenneth Seidelmann (ed), University Science Books (1992)
20008      *
20009      *@version 2010 May 16
20010      *
20011      *@since SOFA release 2010-12-01
20012      *
20013      *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
20014      * @throws JSOFAIllegalParameter 
20015      * @throws JSOFAInternalError 
20016      */
20017     public static JulianDate jauTaiutc(double tai1, double tai2) throws JSOFAIllegalParameter, JSOFAInternalError
20018     {
20019         boolean big1;
20020         int i;
20021         double a1, a2,dats1, ddats, dats2, datd = 0.0, as1, as2, da, d1, d2, fd;
20022         double utc1, utc2;
20023 
20024 
20025         /* Put the two parts of the TAI into big-first order. */
20026         big1 = ( tai1 >= tai2 );
20027         if ( big1 ) {
20028             a1 = tai1;
20029             a2 = tai2;
20030         } else {
20031             a1 = tai2;
20032             a2 = tai1;
20033         }
20034 
20035         /* See if the TAI can possibly be in a leap-second day. */
20036         d1 = a1;
20037         dats1 = 0.0;
20038         for ( i = -1; i <= 3; i++ ) {
20039             d2 = a2 + (double) i;
20040             Calendar dt;
20041             dt = jauJd2cal(d1, d2 );
20042             dats2 = jauDat(dt.iy, dt.im, dt.id, 0.0);
20043 //FIXME            if ( js < 0 ) return -1;
20044             if ( i == -1 ) dats1 = dats2;
20045             ddats = dats2 - dats1;
20046             datd = dats1 / DAYSEC;
20047             if ( abs(ddats) >= 0.5 ) {
20048 
20049                 /* Yes.  Get TAI for the start of the UTC day that */
20050                 /* ends in a leap. */
20051                 JulianDate jd = jauCal2jd(dt.iy, dt.im, dt.id );
20052                 d1 = jd.djm0; d2 = jd.djm1;
20053                 as1 = d1;
20054                 as2 = d2 - 1.0 + datd;
20055 
20056                 /* Is the TAI after this point? */
20057                 da = a1 - as1;
20058                 da = da + ( a2 - as2 );
20059                 if ( da > 0 ) {
20060 
20061                     /* Yes:  fraction of the current UTC day that has elapsed. */
20062                     fd = da * DAYSEC / ( DAYSEC + ddats );
20063 
20064                     /* Ramp TAI-UTC to bring about SOFA's JD(UTC) convention. */
20065                     datd += ddats * ( fd <= 1.0 ? fd : 1.0 ) / DAYSEC;
20066                 }
20067 
20068                 /* Done. */
20069                 break;
20070             }
20071             dats1 = dats2;
20072         }
20073 
20074         /* Subtract the (possibly adjusted) TAI-UTC from TAI to give UTC. */
20075         a2 -= datd;
20076 
20077         /* Return the UTC result, preserving the TAI order. */
20078         if ( big1 ) {
20079             utc1 = a1;
20080             utc2 = a2;
20081         } else {
20082             utc1 = a2;
20083             utc2 = a1;
20084         }
20085 
20086         /* TODO Status */
20087         return new JulianDate(utc1, utc2);
20088 
20089     };
20090 
20091     /**
20092      *
20093      *  Time scale transformation:  Barycentric Coordinate Time, TCB, to
20094      *  Barycentric Dynamical Time, TDB.
20095      *
20096      * <p>This function is derived from the International Astronomical Union's
20097      *  SOFA (Standards of Fundamental Astronomy) software collection.
20098      *
20099      *<p>Status:  canonical.
20100      *
20101      *<!-- Given: -->
20102      *   @param tcb1 double    TCB as a 2-part Julian Date
20103      *   @param tcb2 double    TCB as a 2-part Julian Date 
20104      *
20105      *<!-- Returned:-->
20106      *   @return    TDB as a 2-part Julian Date
20107      *
20108      *
20109      *<p>Notes:
20110      *  <ol>
20111      * <li>  tcb1+tcb2 is Julian Date, apportioned in any convenient way
20112      *     between the two arguments, for example where tcb1 is the Julian
20113      *     Day Number and tcb2 is the fraction of a day.  The returned
20114      *     tdb1,tdb2 follow suit.
20115      *
20116      * <li>  The 2006 IAU General Assembly introduced a conventional linear
20117      *     transformation between TDB and TCB.  This transformation
20118      *     compensates for the drift between TCB and terrestrial time TT,
20119      *     and keeps TDB approximately centered on TT.  Because the
20120      *     relationship between TT and TCB depends on the adopted solar
20121      *     system ephemeris, the degree of alignment between TDB and TT over
20122      *     long intervals will vary according to which ephemeris is used.
20123      *     Former definitions of TDB attempted to avoid this problem by
20124      *     stipulating that TDB and TT should differ only by periodic
20125      *     effects.  This is a good description of the nature of the
20126      *     relationship but eluded precise mathematical formulation.  The
20127      *     conventional linear relationship adopted in 2006 sidestepped
20128      *     these difficulties whilst delivering a TDB that in practice was
20129      *     consistent with values before that date.
20130      *
20131      *  <li>  TDB is essentially the same as Teph, the time argument for the
20132      *     JPL solar system ephemerides.
20133      * </ol>
20134      *  Reference:
20135      *
20136      *     IAU 2006 Resolution B3
20137      *
20138      *@version 2010 May 16
20139      *
20140      *@since SOFA release 2010-12-01
20141      *
20142      *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
20143      */
20144     public static JulianDate jauTcbtdb(double tcb1, double tcb2)
20145     {
20146         double tdb1, tdb2;
20147         /* 1977 Jan 1 00:00:32.184 TT, as two-part JD */
20148         final double t77td = DJM0 + DJM77;
20149         final double t77tf = TTMTAI/DAYSEC;
20150 
20151         /* TDB (days) at TAI 1977 Jan 1.0 */
20152         final double tdb0 = TDB0/86400.0;
20153 
20154         double d;
20155 
20156 
20157         /* Result, safeguarding precision. */
20158         if ( tcb1 > tcb2 ) {
20159             d = tcb1 - t77td;
20160             tdb1 = tcb1;
20161             tdb2 = tcb2 + tdb0 - ( d + ( tcb2 - t77tf ) ) * ELB;
20162         } else {
20163             d = tcb2 - t77td;
20164             tdb1 = tcb1 + tdb0 - ( d + ( tcb1 - t77tf ) ) * ELB;
20165             tdb2 = tcb2;
20166         }
20167 
20168 
20169         return new JulianDate(tdb1, tdb2);
20170 
20171     };
20172 
20173     /**
20174      *  Time scale transformation:  Geocentric Coordinate Time, TCG, to
20175      *  Terrestrial Time, TT.
20176      *
20177      * <p>This function is derived from the International Astronomical Union's
20178      *  SOFA (Standards of Fundamental Astronomy) software collection.
20179      *
20180      *<p>Status:  canonical.
20181      *
20182      *<!-- Given: -->
20183      *  @param tcg1 double    TCG as a 2-part Julian Date
20184      *  @param tcg2 double    TCG as a 2-part Julian Date 
20185      *
20186      *<!-- Returned:-->
20187      *   @return    TT as a 2-part Julian Date
20188      *
20189      *
20190      *  Note:
20191      *
20192      *     tcg1+tcg2 is Julian Date, apportioned in any convenient way
20193      *     between the two arguments, for example where tcg1 is the Julian
20194      *     Day Number and tcg22 is the fraction of a day.  The returned
20195      *     tt1,tt2 follow suit.
20196      *
20197      *<p>References:
20198      *
20199      *     McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),.
20200      *     IERS Technical Note No. 32, BKG (2004)
20201      *
20202      *     IAU 2000 Resolution B1.9
20203      *
20204      *@version 2010 May 14
20205      *
20206      *@since SOFA release 2010-12-01
20207      *
20208      *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
20209      */
20210     public static JulianDate jauTcgtt(double tcg1, double tcg2)
20211     {
20212         double tt1,tt2;
20213         /* 1977 Jan 1 00:00:32.184 TT, as MJD */
20214         final double t77t = DJM77 + TTMTAI/DAYSEC;
20215 
20216 
20217         /* Result, safeguarding precision. */
20218         if ( tcg1 > tcg2 ) {
20219             tt1 = tcg1;
20220             tt2 = tcg2 - ( ( tcg1 - DJM0 ) + ( tcg2 - t77t ) ) * ELG;
20221         } else {
20222             tt1 = tcg1 - ( ( tcg2 - DJM0 ) + ( tcg1 - t77t ) ) * ELG;
20223             tt2 = tcg2;
20224         }
20225 
20226         return new JulianDate(tt1, tt2);
20227     };
20228 
20229 
20230     /**
20231      *
20232      *  Time scale transformation:  Barycentric Dynamical Time, TDB, to
20233      *  Barycentric Coordinate Time, TCB.
20234      *
20235      * <p>This function is derived from the International Astronomical Union's
20236      *  SOFA (Standards of Fundamental Astronomy) software collection.
20237      *
20238      *<p>Status:  canonical.
20239      *
20240      *<!-- Given: -->
20241      *   @param tdb1 TDB as a 2-part Julian Date
20242      *   @param tdb2 TDB as a 2-part Julian Date 
20243      *
20244      *<!-- Returned:-->
20245      *   @return    TCB as a 2-part Julian Date
20246      *
20247      *<p>Notes:
20248      * <ol>
20249      *  <li>  tdb1+tdb2 is Julian Date, apportioned in any convenient way
20250      *     between the two arguments, for example where tdb1 is the Julian
20251      *     Day Number and tdb2 is the fraction of a day.  The returned
20252      *     tcb1,tcb2 follow suit.
20253      *
20254      *  <li> The 2006 IAU General Assembly introduced a conventional linear
20255      *     transformation between TDB and TCB.  This transformation
20256      *     compensates for the drift between TCB and terrestrial time TT,
20257      *     and keeps TDB approximately centered on TT.  Because the
20258      *     relationship between TT and TCB depends on the adopted solar
20259      *     system ephemeris, the degree of alignment between TDB and TT over
20260      *     long intervals will vary according to which ephemeris is used.
20261      *     Former definitions of TDB attempted to avoid this problem by
20262      *     stipulating that TDB and TT should differ only by periodic
20263      *     effects.  This is a good description of the nature of the
20264      *     relationship but eluded precise mathematical formulation.  The
20265      *     conventional linear relationship adopted in 2006 sidestepped
20266      *     these difficulties whilst delivering a TDB that in practice was
20267      *     consistent with values before that date.
20268      *
20269      * <li>  TDB is essentially the same as Teph, the time argument for the
20270      *     JPL solar system ephemerides.
20271      *  </ol>
20272      *  Reference:
20273      *
20274      *     IAU 2006 Resolution B3
20275      *
20276      *@version 2010 September 10
20277      *
20278      *@since SOFA release 2010-12-01
20279      *
20280      *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
20281      */
20282     public static JulianDate jauTdbtcb(double tdb1, double tdb2 )
20283     {
20284         double tcb1, tcb2;
20285         /* 1977 Jan 1 00:00:32.184 TT, as two-part JD */
20286         final double t77td = DJM0 + DJM77;
20287         final double t77tf = TTMTAI/DAYSEC;
20288 
20289         /* TDB (days) at TAI 1977 Jan 1.0 */
20290         final double tdb0 = TDB0/DAYSEC;
20291 
20292         /* TDB to TCB rate */
20293         final double elbb = ELB/(1.0-ELB);
20294 
20295         double d, f;
20296 
20297 
20298         /* Result, preserving date format but safeguarding precision. */
20299         if ( tdb1 > tdb2 ) {
20300             d = t77td - tdb1;
20301             f  = tdb2 - tdb0;
20302             tcb1 = tdb1;
20303             tcb2 = f - ( d - ( f - t77tf ) ) * elbb;
20304         } else {
20305             d = t77td - tdb2;
20306             f  = tdb1 - tdb0;
20307             tcb1 = f + ( d - ( f - t77tf ) ) * elbb;
20308             tcb2 = tdb2;
20309         }
20310 
20311         return new JulianDate(tcb1, tcb2);
20312 
20313     };
20314 
20315 
20316     /**
20317      *
20318      *  Time scale transformation:  Barycentric Dynamical Time, TDB, to
20319      *  Terrestrial Time, TT.
20320      *
20321      * <p>This function is derived from the International Astronomical Union's
20322      *  SOFA (Standards of Fundamental Astronomy) software collection.
20323      *
20324      *<p>Status:  canonical.
20325      *
20326      *<!-- Given: -->
20327      *    @param tdb1 double    TDB as a 2-part Julian Date
20328      *    @param tdb2 double    TDB as a 2-part Julian Date 
20329      *    @param dtr        double    TDB-TT in seconds
20330      *
20331      *<!-- Returned:-->
20332      *   @return   TT as a 2-part Julian Date
20333      *
20334      *
20335      *<p>Notes:
20336      * <ol>
20337      * <li>  tdb1+tdb2 is Julian Date, apportioned in any convenient way
20338      *     between the two arguments, for example where tdb1 is the Julian
20339      *     Day Number and tdb2 is the fraction of a day.  The returned
20340      *     tt1,tt2 follow suit.
20341      *
20342      *  <li>  The argument dtr represents the quasi-periodic component of the
20343      *     GR transformation between TT and TCB.  It is dependent upon the
20344      *     adopted solar-system ephemeris, and can be obtained by numerical
20345      *     integration, by interrogating a precomputed time ephemeris or by
20346      *     evaluating a model such as that implemented in the SOFA function
20347      *     jauDtdb.   The quantity is dominated by an annual term of 1.7 ms
20348      *     amplitude.
20349      *
20350      *  <li>  TDB is essentially the same as Teph, the time argument for the
20351      *     JPL solar system ephemerides.
20352      *  </ol>
20353      *<p>References:
20354      *
20355      *     McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
20356      *     IERS Technical Note No. 32, BKG (2004)
20357      *
20358      *     IAU 2006 Resolution 3
20359      *
20360      *@version 2010 May 13
20361      *
20362      *@since SOFA release 2010-12-01
20363      *
20364      *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
20365      *
20366      */
20367     public static JulianDate jauTdbtt(double tdb1, double tdb2, double dtr  )
20368     {
20369         double tt1, tt2;
20370         double dtrd;
20371 
20372 
20373         /* Result, safeguarding precision. */
20374         dtrd = dtr / DAYSEC;
20375         if ( tdb1 > tdb2 ) {
20376             tt1 = tdb1;
20377             tt2 = tdb2 - dtrd;
20378         } else {
20379             tt1 = tdb1 - dtrd;
20380             tt2 = tdb2;
20381         }
20382 
20383         return new JulianDate(tt1, tt2);
20384 
20385     }
20386 
20387     /**
20388      *
20389      *  Convert hours, minutes, seconds to radians.
20390      *
20391      * <p>This function is derived from the International Astronomical Union's
20392      *  SOFA (Standards of Fundamental Astronomy) software collection.
20393      *
20394      *<p>Status:  support function.
20395      *
20396      *<!-- Given: -->
20397      *     @param s         char     sign:  '-' = negative, otherwise positive
20398      *     @param ihour     int     hours
20399      *     @param imin      int     minutes
20400      *     @param sec       double  seconds
20401      *
20402      *<!-- Returned:-->
20403      *     @return      double  angle in radians
20404      *@throws JSOFAIllegalParameter illegal parameter of some form
20405      *  Returned (function value):
20406      *               int     status:  0 = OK
20407      *                                1 = ihour outside range 0-23
20408      *                                2 = imin outside range 0-59
20409      *                                3 = sec outside range 0-59.999...
20410      *
20411      *<p>Notes:
20412      *<ul>
20413      *  <li>  The result is computed even if any of the range checks fail.
20414      *
20415      *  <li>  Negative ihour, imin and/or sec produce a warning status, but
20416      *      the absolute value is used in the conversion.
20417      *</ul>
20418      *@version 2010 August 27
20419      *
20420      *@since SOFA release 2010-12-01
20421      *
20422      *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
20423      * 
20424      */
20425     public static double jauTf2a(char s, int ihour, int imin, double sec ) throws JSOFAIllegalParameter
20426     {
20427         double rad;
20428 
20429         /* Compute the interval. */
20430         rad  = ( s == '-' ? -1.0 : 1.0 ) *
20431                 ( 60.0 * ( 60.0 * ( (double) abs(ihour) ) +
20432                         ( (double) abs(imin) ) ) +
20433                         abs(sec) ) * DS2R;
20434 
20435         /*  Validate arguments and return status. */
20436         if ( ihour < 0 || ihour > 23 ) throw new JSOFAIllegalParameter("bad hour", 1);   
20437         if ( imin < 0 || imin > 59 )   throw new JSOFAIllegalParameter("bad minute", 2); 
20438         if ( sec < 0.0 || sec >= 60.0 )throw new JSOFAIllegalParameter("bad second", 3); 
20439         return rad;
20440 
20441     };
20442 
20443     /**
20444      *
20445      *  Convert hours, minutes, seconds to days.
20446      *
20447      * <p>This function is derived from the International Astronomical Union's
20448      *  SOFA (Standards of Fundamental Astronomy) software collection.
20449      *
20450      *<p>Status:  support function.
20451      *
20452      *<!-- Given: -->
20453      *     @param s         char     sign:  '-' = negative, otherwise positive
20454      *     @param ihour     int     hours
20455      *     @param imin      int     minutes
20456      *     @param sec       double  seconds
20457      *
20458      *<!-- Returned:-->
20459      *     days      double  interval in days
20460      *
20461      *  Returned (function value):
20462      *               int     status:  0 = OK
20463      *                                1 = ihour outside range 0-23
20464      *                                2 = imin outside range 0-59
20465      *                                3 = sec outside range 0-59.999...
20466      *
20467      *<p>Notes:
20468      *<ol>
20469      *  <li>  The result is computed even if any of the range checks fail.
20470      *
20471      *  <li>  Negative ihour, imin and/or sec produce a warning status, but
20472      *      the absolute value is used in the conversion.
20473      *</ol>
20474      *@version 2010 August 27
20475      *
20476      *@since SOFA release 2010-12-01
20477      *
20478      *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
20479      * @throws JSOFAIllegalParameter 
20480      */
20481     public static double jauTf2d(char s, int ihour, int imin, double sec) throws JSOFAIllegalParameter
20482     {
20483         double days;
20484         /* Compute the interval. */
20485         days  = ( s == '-' ? -1.0 : 1.0 ) *
20486                 ( 60.0 * ( 60.0 * ( (double) abs(ihour) ) +
20487                         ( (double) abs(imin) ) ) +
20488                         abs(sec) ) / DAYSEC;
20489 
20490         /* FIXME Validate arguments and return status. */
20491         if ( ihour < 0 || ihour > 23 )  throw new JSOFAIllegalParameter("bad hour", 1);
20492         if ( imin < 0 || imin > 59 )    throw new JSOFAIllegalParameter("bad minute", 2);
20493         if ( sec < 0.0 || sec >= 60.0 ) throw new JSOFAIllegalParameter("bad second", 3);
20494         return days;
20495 
20496     }
20497 
20498     /**
20499      *  Transpose an r-matrix.
20500      *
20501      *<p>This function is derived from the International Astronomical Union's
20502      *  SOFA (Standards Of Fundamental Astronomy) software collection.
20503      *
20504      *<p>Status:  vector/matrix support function.
20505      *
20506      *<!-- Given: -->
20507      *     @param r         double[3][3]     r-matrix
20508      *
20509      *<!-- Returned: -->
20510      *     @return rt        double[3][3]      <u>returned</u> transpose
20511      *
20512      *  Note:
20513      *     It is permissible for r and rt to be the same array.
20514      *
20515      *<p>Called:<ul>
20516      *     <li>{@link #jauCr} copy r-matrix
20517      * </ul>
20518      *@version 2008 May 22
20519      *
20520      *  @since Release 20101201
20521      *
20522      *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
20523      */
20524     public static double[][] jauTr(double r[][])
20525     {
20526         double wm[][]= new double[3][3];
20527         int i, j;
20528 
20529 
20530         for (i = 0; i < 3; i++) {
20531             for (j = 0; j < 3; j++) {
20532                 wm[i][j] = r[j][i];
20533             }
20534         }
20535 
20536 
20537         return wm;
20538 
20539     }
20540 
20541 
20542     /**
20543      *  Multiply a p-vector by the transpose of an r-matrix.
20544      *
20545      *<p>This function is derived from the International Astronomical Union's
20546      *  SOFA (Standards Of Fundamental Astronomy) software collection.
20547      *
20548      *<p>Status:  vector/matrix support function.
20549      *
20550      *<!-- Given: -->
20551      *     @param r         double[3][3]    r-matrix
20552      *     @param p         double[3]       p-vector
20553      *
20554      *<!-- Returned: -->
20555      *     @return trp       double[3]        <u>returned</u> r * p
20556      *
20557      *  Note:
20558      *     It is permissible for p and trp to be the same array.
20559      *
20560      *<p>Called:<ul>
20561      *     <li>{@link #jauTr} transpose r-matrix
20562     *     <li>{@link #jauRxp} product of r-matrix and p-vector
20563     * </ul>
20564     *@version 2008 October 28
20565     *
20566     *  @since Release 20101201
20567     *
20568     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
20569     */
20570     public static double[] jauTrxp(double r[][], double p[]  )
20571     {
20572        double tr[][];
20573        double trp[];
20574 
20575     /* Transpose of matrix r. */
20576        tr = jauTr(r);
20577 
20578     /* Matrix tr * vector p -> vector trp. */
20579        trp = jauRxp(tr, p);
20580 
20581        return trp;
20582 
20583         }
20584     
20585 
20586     /**
20587     *  Multiply a pv-vector by the transpose of an r-matrix.
20588     *
20589     *<p>This function is derived from the International Astronomical Union's
20590     *  SOFA (Standards Of Fundamental Astronomy) software collection.
20591     *
20592     *<p>Status:  vector/matrix support function.
20593     *
20594     *<!-- Given: -->
20595     *     @param r         double[3][3]     r-matrix
20596     *     @param pv        double[2][3]     pv-vector
20597     *
20598     *<!-- Returned: -->
20599     *     @return trpv      double[2][3]      <u>returned</u> r * pv
20600     *
20601     *  Note:
20602     *     It is permissible for pv and trpv to be the same array.
20603     *
20604     *<p>Called:<ul>
20605     *     <li>{@link #jauTr} transpose r-matrix
20606     *     <li>{@link #jauRxpv} product of r-matrix and pv-vector
20607     * </ul>
20608     *@version 2008 October 28
20609     *
20610     *  @since Release 20101201
20611     *
20612     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
20613     */
20614     public static double[][] jauTrxpv(double r[][], double pv[][] )
20615     {
20616        double tr[][], trpv[][];
20617 
20618 
20619     /* Transpose of matrix r. */
20620        tr = jauTr(r);
20621 
20622     /* Matrix tr * vector pv -> vector trpv. */
20623        trpv = jauRxpv(tr, pv);
20624 
20625        return trpv;
20626 
20627         }
20628     
20629     /*
20630      * constant arrays set outside jauXy06 to avoid problems with 65535 byte limit on function size
20631      */
20632     static {
20633         /* need to define this function because it appears that javac lumps all of the statically defined initalizers into one function on 
20634          * compilation - so this will force a second function */
20635         init_mfals();
20636     }
20637     /** Fundamental-argument multipliers:  luni-solar terms */
20638     private static int mfals[][]; //IMPL would like to be final really
20639     
20640     private static void init_mfals(){
20641         
20642     mfals = new int[][]
20643     {
20644 
20645    /* 1-10 */
20646       {  0,   0,   0,   0,   1 },
20647       {  0,   0,   2,  -2,   2 },
20648       {  0,   0,   2,   0,   2 },
20649       {  0,   0,   0,   0,   2 },
20650       {  0,   1,   0,   0,   0 },
20651       {  0,   1,   2,  -2,   2 },
20652       {  1,   0,   0,   0,   0 },
20653       {  0,   0,   2,   0,   1 },
20654       {  1,   0,   2,   0,   2 },
20655       {  0,   1,  -2,   2,  -2 },
20656 
20657    /* 11-20 */
20658       {  0,   0,   2,  -2,   1 },
20659       {  1,   0,  -2,   0,  -2 },
20660       {  1,   0,   0,  -2,   0 },
20661       {  1,   0,   0,   0,   1 },
20662       {  1,   0,   0,   0,  -1 },
20663       {  1,   0,  -2,  -2,  -2 },
20664       {  1,   0,   2,   0,   1 },
20665       {  2,   0,  -2,   0,  -1 },
20666       {  0,   0,   0,   2,   0 },
20667       {  0,   0,   2,   2,   2 },
20668 
20669    /* 21-30 */
20670       {  2,   0,   0,  -2,   0 },
20671       {  0,   2,  -2,   2,  -2 },
20672       {  2,   0,   2,   0,   2 },
20673       {  1,   0,   2,  -2,   2 },
20674       {  1,   0,  -2,   0,  -1 },
20675       {  2,   0,   0,   0,   0 },
20676       {  0,   0,   2,   0,   0 },
20677       {  0,   1,   0,   0,   1 },
20678       {  1,   0,   0,  -2,  -1 },
20679       {  0,   2,   2,  -2,   2 },
20680 
20681    /* 31-40 */
20682       {  0,   0,   2,  -2,   0 },
20683       {  1,   0,   0,  -2,   1 },
20684       {  0,   1,   0,   0,  -1 },
20685       {  0,   2,   0,   0,   0 },
20686       {  1,   0,  -2,  -2,  -1 },
20687       {  1,   0,   2,   2,   2 },
20688       {  0,   1,   2,   0,   2 },
20689       {  2,   0,  -2,   0,   0 },
20690       {  0,   0,   2,   2,   1 },
20691       {  0,   1,  -2,   0,  -2 },
20692 
20693    /* 41-50 */
20694       {  0,   0,   0,   2,   1 },
20695       {  1,   0,   2,  -2,   1 },
20696       {  2,   0,   0,  -2,  -1 },
20697       {  2,   0,   2,  -2,   2 },
20698       {  2,   0,   2,   0,   1 },
20699       {  0,   0,   0,   2,  -1 },
20700       {  0,   1,  -2,   2,  -1 },
20701       {  1,   1,   0,  -2,   0 },
20702       {  2,   0,   0,  -2,   1 },
20703       {  1,   0,   0,   2,   0 },
20704 
20705    /* 51-60 */
20706       {  0,   1,   2,  -2,   1 },
20707       {  1,  -1,   0,   0,   0 },
20708       {  0,   1,  -1,   1,  -1 },
20709       {  2,   0,  -2,   0,  -2 },
20710       {  0,   1,   0,  -2,   0 },
20711       {  1,   0,   0,  -1,   0 },
20712       {  3,   0,   2,   0,   2 },
20713       {  0,   0,   0,   1,   0 },
20714       {  1,  -1,   2,   0,   2 },
20715       {  1,   1,  -2,  -2,  -2 },
20716 
20717    /* 61-70 */
20718       {  1,   0,  -2,   0,   0 },
20719       {  2,   0,   0,   0,  -1 },
20720       {  0,   1,  -2,  -2,  -2 },
20721       {  1,   1,   2,   0,   2 },
20722       {  2,   0,   0,   0,   1 },
20723       {  1,   1,   0,   0,   0 },
20724       {  1,   0,  -2,   2,  -1 },
20725       {  1,   0,   2,   0,   0 },
20726       {  1,  -1,   0,  -1,   0 },
20727       {  1,   0,   0,   0,   2 },
20728 
20729    /* 71-80 */
20730       {  1,   0,  -1,   0,  -1 },
20731       {  0,   0,   2,   1,   2 },
20732       {  1,   0,  -2,  -4,  -2 },
20733       {  1,  -1,   0,  -1,  -1 },
20734       {  1,   0,   2,   2,   1 },
20735       {  0,   2,  -2,   2,  -1 },
20736       {  1,   0,   0,   0,  -2 },
20737       {  2,   0,  -2,  -2,  -2 },
20738       {  1,   1,   2,  -2,   2 },
20739       {  2,   0,  -2,  -4,  -2 },
20740 
20741    /* 81-90 */
20742       {  1,   0,  -4,   0,  -2 },
20743       {  2,   0,   2,  -2,   1 },
20744       {  1,   0,   0,  -1,  -1 },
20745       {  2,   0,   2,   2,   2 },
20746       {  3,   0,   0,   0,   0 },
20747       {  1,   0,   0,   2,   1 },
20748       {  0,   0,   2,  -2,  -1 },
20749       {  3,   0,   2,  -2,   2 },
20750       {  0,   0,   4,  -2,   2 },
20751       {  1,   0,   0,  -4,   0 },
20752 
20753    /* 91-100 */
20754       {  0,   1,   2,   0,   1 },
20755       {  2,   0,   0,  -4,   0 },
20756       {  1,   1,   0,  -2,  -1 },
20757       {  2,   0,  -2,   0,   1 },
20758       {  0,   0,   2,   0,  -1 },
20759       {  0,   1,  -2,   0,  -1 },
20760       {  0,   1,   0,   0,   2 },
20761       {  0,   0,   2,  -1,   2 },
20762       {  0,   0,   2,   4,   2 },
20763       {  2,   1,   0,  -2,   0 },
20764 
20765    /* 101-110 */
20766       {  1,   1,   0,  -2,   1 },
20767       {  1,  -1,   0,  -2,   0 },
20768       {  1,  -1,   0,  -1,  -2 },
20769       {  1,  -1,   0,   0,   1 },
20770       {  0,   1,  -2,   2,   0 },
20771       {  0,   1,   0,   0,  -2 },
20772       {  1,  -1,   2,   2,   2 },
20773       {  1,   0,   0,   2,  -1 },
20774       {  1,  -1,  -2,  -2,  -2 },
20775       {  3,   0,   2,   0,   1 },
20776 
20777    /* 111-120 */
20778       {  0,   1,   2,   2,   2 },
20779       {  1,   0,   2,  -2,   0 },
20780       {  1,   1,  -2,  -2,  -1 },
20781       {  1,   0,   2,  -4,   1 },
20782       {  0,   1,  -2,  -2,  -1 },
20783       {  2,  -1,   2,   0,   2 },
20784       {  0,   0,   0,   2,   2 },
20785       {  1,  -1,   2,   0,   1 },
20786       {  1,  -1,  -2,   0,  -2 },
20787       {  0,   1,   0,   2,   0 },
20788 
20789    /* 121-130 */
20790       {  0,   1,   2,  -2,   0 },
20791       {  0,   0,   0,   1,   1 },
20792       {  1,   0,  -2,  -2,   0 },
20793       {  0,   3,   2,  -2,   2 },
20794       {  2,   1,   2,   0,   2 },
20795       {  1,   1,   0,   0,   1 },
20796       {  2,   0,   0,   2,   0 },
20797       {  1,   1,   2,   0,   1 },
20798       {  1,   0,   0,  -2,  -2 },
20799       {  1,   0,  -2,   2,   0 },
20800 
20801    /* 131-140 */
20802       {  1,   0,  -1,   0,  -2 },
20803       {  0,   1,   0,  -2,   1 },
20804       {  0,   1,   0,   1,   0 },
20805       {  0,   0,   0,   1,  -1 },
20806       {  1,   0,  -2,   2,  -2 },
20807       {  1,  -1,   0,   0,  -1 },
20808       {  0,   0,   0,   4,   0 },
20809       {  1,  -1,   0,   2,   0 },
20810       {  1,   0,   2,   1,   2 },
20811       {  1,   0,   2,  -1,   2 },
20812 
20813    /* 141-150 */
20814       {  0,   0,   2,   1,   1 },
20815       {  1,   0,   0,  -2,   2 },
20816       {  1,   0,  -2,   0,   1 },
20817       {  1,   0,  -2,  -4,  -1 },
20818       {  0,   0,   2,   2,   0 },
20819       {  1,   1,   2,  -2,   1 },
20820       {  1,   0,  -2,   1,  -1 },
20821       {  0,   0,   1,   0,   1 },
20822       {  2,   0,  -2,  -2,  -1 },
20823       {  4,   0,   2,   0,   2 },
20824 
20825    /* 151-160 */
20826       {  2,  -1,   0,   0,   0 },
20827       {  2,   1,   2,  -2,   2 },
20828       {  0,   1,   2,   1,   2 },
20829       {  1,   0,   4,  -2,   2 },
20830       {  1,   1,   0,   0,  -1 },
20831       {  2,   0,   2,   0,   0 },
20832       {  2,   0,  -2,  -4,  -1 },
20833       {  1,   0,  -1,   0,   0 },
20834       {  1,   0,   0,   1,   0 },
20835       {  0,   1,   0,   2,   1 },
20836 
20837    /* 161-170 */
20838       {  1,   0,  -4,   0,  -1 },
20839       {  1,   0,   0,  -4,  -1 },
20840       {  2,   0,   2,   2,   1 },
20841       {  2,   1,   0,   0,   0 },
20842       {  0,   0,   2,  -3,   2 },
20843       {  1,   2,   0,  -2,   0 },
20844       {  0,   3,   0,   0,   0 },
20845       {  0,   0,   4,   0,   2 },
20846       {  0,   0,   2,  -4,   1 },
20847       {  2,   0,   0,  -2,  -2 },
20848 
20849    /* 171-180 */
20850       {  1,   1,  -2,  -4,  -2 },
20851       {  0,   1,   0,  -2,  -1 },
20852       {  0,   0,   0,   4,   1 },
20853       {  3,   0,   2,  -2,   1 },
20854       {  1,   0,   2,   4,   2 },
20855       {  1,   1,  -2,   0,  -2 },
20856       {  0,   0,   4,  -2,   1 },
20857       {  2,  -2,   0,  -2,   0 },
20858       {  2,   1,   0,  -2,  -1 },
20859       {  0,   2,   0,  -2,   0 },
20860 
20861    /* 181-190 */
20862       {  1,   0,   0,  -1,   1 },
20863       {  1,   1,   2,   2,   2 },
20864       {  3,   0,   0,   0,  -1 },
20865       {  2,   0,   0,  -4,  -1 },
20866       {  3,   0,   2,   2,   2 },
20867       {  0,   0,   2,   4,   1 },
20868       {  0,   2,  -2,  -2,  -2 },
20869       {  1,  -1,   0,  -2,  -1 },
20870       {  0,   0,   2,  -1,   1 },
20871       {  2,   0,   0,   2,   1 },
20872 
20873    /* 191-200 */
20874       {  1,  -1,  -2,   2,  -1 },
20875       {  0,   0,   0,   2,  -2 },
20876       {  2,   0,   0,  -4,   1 },
20877       {  1,   0,   0,  -4,   1 },
20878       {  2,   0,   2,  -4,   1 },
20879       {  4,   0,   2,  -2,   2 },
20880       {  2,   1,  -2,   0,  -1 },
20881       {  2,   1,  -2,  -4,  -2 },
20882       {  3,   0,   0,  -4,   0 },
20883       {  1,  -1,   2,   2,   1 },
20884 
20885    /* 201-210 */
20886       {  1,  -1,  -2,   0,  -1 },
20887       {  0,   2,   0,   0,   1 },
20888       {  1,   2,  -2,  -2,  -2 },
20889       {  1,   1,   0,  -4,   0 },
20890       {  2,   0,   0,  -2,   2 },
20891       {  0,   2,   2,  -2,   1 },
20892       {  1,   0,   2,   0,  -1 },
20893       {  2,   1,   0,  -2,   1 },
20894       {  2,  -1,  -2,   0,  -1 },
20895       {  1,  -1,  -2,  -2,  -1 },
20896 
20897    /* 211-220 */
20898       {  0,   1,  -2,   1,  -2 },
20899       {  1,   0,  -4,   2,  -2 },
20900       {  0,   1,   2,   2,   1 },
20901       {  3,   0,   0,   0,   1 },
20902       {  2,  -1,   2,   2,   2 },
20903       {  0,   1,  -2,  -4,  -2 },
20904       {  1,   0,  -2,  -3,  -2 },
20905       {  2,   0,   0,   0,   2 },
20906       {  1,  -1,   0,  -2,  -2 },
20907       {  2,   0,  -2,   2,  -1 },
20908 
20909    /* 221-230 */
20910       {  0,   2,  -2,   0,  -2 },
20911       {  3,   0,  -2,   0,  -1 },
20912       {  2,  -1,   2,   0,   1 },
20913       {  1,   0,  -2,  -1,  -2 },
20914       {  0,   0,   2,   0,   3 },
20915       {  2,   0,  -4,   0,  -2 },
20916       {  2,   1,   0,  -4,   0 },
20917       {  1,   1,  -2,   1,  -1 },
20918       {  0,   2,   2,   0,   2 },
20919       {  1,  -1,   2,  -2,   2 },
20920 
20921    /* 231-240 */
20922       {  1,  -1,   0,  -2,   1 },
20923       {  2,   1,   2,   0,   1 },
20924       {  1,   0,   2,  -4,   2 },
20925       {  1,   1,  -2,   0,  -1 },
20926       {  1,   1,   0,   2,   0 },
20927       {  1,   0,   0,  -3,   0 },
20928       {  2,   0,   2,  -1,   2 },
20929       {  0,   2,   0,   0,  -1 },
20930       {  2,  -1,   0,  -2,   0 },
20931       {  4,   0,   0,   0,   0 },
20932 
20933    /* 241-250 */
20934       {  2,   1,  -2,  -2,  -2 },
20935       {  0,   2,  -2,   2,   0 },
20936       {  1,   0,   2,   1,   1 },
20937       {  1,   0,  -1,   0,  -3 },
20938       {  3,  -1,   2,   0,   2 },
20939       {  2,   0,   2,  -2,   0 },
20940       {  1,  -2,   0,   0,   0 },
20941       {  2,   0,   0,   0,  -2 },
20942       {  1,   0,   0,   4,   0 },
20943       {  0,   1,   0,   1,   1 },
20944 
20945    /* 251-260 */
20946       {  1,   0,   2,   2,   0 },
20947       {  0,   1,   0,   2,  -1 },
20948       {  0,   1,   0,   1,  -1 },
20949       {  0,   0,   2,  -2,   3 },
20950       {  3,   1,   2,   0,   2 },
20951       {  1,   1,   2,   1,   2 },
20952       {  1,   1,  -2,   2,  -1 },
20953       {  2,  -1,   2,  -2,   2 },
20954       {  1,  -2,   2,   0,   2 },
20955       {  1,   0,   2,  -4,   0 },
20956 
20957    /* 261-270 */
20958       {  0,   0,   1,   0,   0 },
20959       {  1,   0,   2,  -3,   1 },
20960       {  1,  -2,   0,  -2,   0 },
20961       {  2,   0,   0,   2,  -1 },
20962       {  1,   1,   2,  -4,   1 },
20963       {  4,   0,   2,   0,   1 },
20964       {  0,   1,   2,   1,   1 },
20965       {  1,   2,   2,  -2,   2 },
20966       {  2,   0,   2,   1,   2 },
20967       {  2,   1,   2,  -2,   1 },
20968 
20969    /* 271-280 */
20970       {  1,   0,   2,  -1,   1 },
20971       {  1,   0,   4,  -2,   1 },
20972       {  1,  -1,   2,  -2,   1 },
20973       {  0,   1,   0,  -4,   0 },
20974       {  3,   0,  -2,  -2,  -2 },
20975       {  0,   0,   4,  -4,   2 },
20976       {  2,   0,  -4,  -2,  -2 },
20977       {  2,  -2,   0,  -2,  -1 },
20978       {  1,   0,   2,  -2,  -1 },
20979       {  2,   0,  -2,  -6,  -2 },
20980 
20981    /* 281-290 */
20982       {  1,   0,  -2,   1,  -2 },
20983       {  1,   0,  -2,   2,   1 },
20984       {  1,  -1,   0,   2,  -1 },
20985       {  1,   0,  -2,   1,   0 },
20986       {  2,  -1,   0,  -2,   1 },
20987       {  1,  -1,   0,   2,   1 },
20988       {  2,   0,  -2,  -2,   0 },
20989       {  1,   0,   2,  -3,   2 },
20990       {  0,   0,   0,   4,  -1 },
20991       {  2,  -1,   0,   0,   1 },
20992 
20993    /* 291-300 */
20994       {  2,   0,   4,  -2,   2 },
20995       {  0,   0,   2,   3,   2 },
20996       {  0,   1,   4,  -2,   2 },
20997       {  0,   1,  -2,   2,   1 },
20998       {  1,   1,   0,   2,   1 },
20999       {  1,   0,   0,   4,   1 },
21000       {  0,   0,   4,   0,   1 },
21001       {  2,   0,   0,  -3,   0 },
21002       {  1,   0,   0,  -1,  -2 },
21003       {  1,  -2,  -2,  -2,  -2 },
21004 
21005    /* 301-310 */
21006       {  3,   0,   0,   2,   0 },
21007       {  2,   0,   2,  -4,   2 },
21008       {  1,   1,  -2,  -4,  -1 },
21009       {  1,   0,  -2,  -6,  -2 },
21010       {  2,  -1,   0,   0,  -1 },
21011       {  2,  -1,   0,   2,   0 },
21012       {  0,   1,   2,  -2,  -1 },
21013       {  1,   1,   0,   1,   0 },
21014       {  1,   2,   0,  -2,  -1 },
21015       {  1,   0,   0,   1,  -1 },
21016 
21017    /* 311-320 */
21018       {  0,   0,   1,   0,   2 },
21019       {  3,   1,   2,  -2,   2 },
21020       {  1,   0,  -4,  -2,  -2 },
21021       {  1,   0,   2,   4,   1 },
21022       {  1,  -2,   2,   2,   2 },
21023       {  1,  -1,  -2,  -4,  -2 },
21024       {  0,   0,   2,  -4,   2 },
21025       {  0,   0,   2,  -3,   1 },
21026       {  2,   1,  -2,   0,   0 },
21027       {  3,   0,  -2,  -2,  -1 },
21028 
21029    /* 321-330 */
21030       {  2,   0,   2,   4,   2 },
21031       {  0,   0,   0,   0,   3 },
21032       {  2,  -1,  -2,  -2,  -2 },
21033       {  2,   0,   0,  -1,   0 },
21034       {  3,   0,   2,  -4,   2 },
21035       {  2,   1,   2,   2,   2 },
21036       {  0,   0,   3,   0,   3 },
21037       {  1,   1,   2,   2,   1 },
21038       {  2,   1,   0,   0,  -1 },
21039       {  1,   2,   0,  -2,   1 },
21040 
21041    /* 331-340 */
21042       {  3,   0,   2,   2,   1 },
21043       {  1,  -1,  -2,   2,  -2 },
21044       {  1,   1,   0,  -1,   0 },
21045       {  1,   2,   0,   0,   0 },
21046       {  1,   0,   4,   0,   2 },
21047       {  1,  -1,   2,   4,   2 },
21048       {  2,   1,   0,   0,   1 },
21049       {  1,   0,   0,   2,   2 },
21050       {  1,  -1,  -2,   2,   0 },
21051       {  0,   2,  -2,  -2,  -1 },
21052 
21053    /* 341-350 */
21054       {  2,   0,  -2,   0,   2 },
21055       {  5,   0,   2,   0,   2 },
21056       {  3,   0,  -2,  -6,  -2 },
21057       {  1,  -1,   2,  -1,   2 },
21058       {  3,   0,   0,  -4,  -1 },
21059       {  1,   0,   0,   1,   1 },
21060       {  1,   0,  -4,   2,  -1 },
21061       {  0,   1,   2,  -4,   1 },
21062       {  1,   2,   2,   0,   2 },
21063       {  0,   1,   0,  -2,  -2 },
21064 
21065    /* 351-360 */
21066       {  0,   0,   2,  -1,   0 },
21067       {  1,   0,   1,   0,   1 },
21068       {  0,   2,   0,  -2,   1 },
21069       {  3,   0,   2,   0,   0 },
21070       {  1,   1,  -2,   1,   0 },
21071       {  2,   1,  -2,  -4,  -1 },
21072       {  3,  -1,   0,   0,   0 },
21073       {  2,  -1,  -2,   0,   0 },
21074       {  4,   0,   2,  -2,   1 },
21075       {  2,   0,  -2,   2,   0 },
21076 
21077    /* 361-370 */
21078       {  1,   1,   2,  -2,   0 },
21079       {  1,   0,  -2,   4,  -1 },
21080       {  1,   0,  -2,  -2,   1 },
21081       {  2,   0,   2,  -4,   0 },
21082       {  1,   1,   0,  -2,  -2 },
21083       {  1,   1,  -2,  -2,   0 },
21084       {  1,   0,   1,  -2,   1 },
21085       {  2,  -1,  -2,  -4,  -2 },
21086       {  3,   0,  -2,   0,  -2 },
21087       {  0,   1,  -2,  -2,   0 },
21088 
21089    /* 371-380 */
21090       {  3,   0,   0,  -2,  -1 },
21091       {  1,   0,  -2,  -3,  -1 },
21092       {  0,   1,   0,  -4,  -1 },
21093       {  1,  -2,   2,  -2,   1 },
21094       {  0,   1,  -2,   1,  -1 },
21095       {  1,  -1,   0,   0,   2 },
21096       {  2,   0,   0,   1,   0 },
21097       {  1,  -2,   0,   2,   0 },
21098       {  1,   2,  -2,  -2,  -1 },
21099       {  0,   0,   4,  -4,   1 },
21100 
21101    /* 381-390 */
21102       {  0,   1,   2,   4,   2 },
21103       {  0,   1,  -4,   2,  -2 },
21104       {  3,   0,  -2,   0,   0 },
21105       {  2,  -1,   2,   2,   1 },
21106       {  0,   1,  -2,  -4,  -1 },
21107       {  4,   0,   2,   2,   2 },
21108       {  2,   0,  -2,  -3,  -2 },
21109       {  2,   0,   0,  -6,   0 },
21110       {  1,   0,   2,   0,   3 },
21111       {  3,   1,   0,   0,   0 },
21112 
21113    /* 391-400 */
21114       {  3,   0,   0,  -4,   1 },
21115       {  1,  -1,   2,   0,   0 },
21116       {  1,  -1,   0,  -4,   0 },
21117       {  2,   0,  -2,   2,  -2 },
21118       {  1,   1,   0,  -2,   2 },
21119       {  4,   0,   0,  -2,   0 },
21120       {  2,   2,   0,  -2,   0 },
21121       {  0,   1,   2,   0,   0 },
21122       {  1,   1,   0,  -4,   1 },
21123       {  1,   0,   0,  -4,  -2 },
21124 
21125    /* 401-410 */
21126       {  0,   0,   0,   1,   2 },
21127       {  3,   0,   0,   2,   1 },
21128       {  1,   1,   0,  -4,  -1 },
21129       {  0,   0,   2,   2,  -1 },
21130       {  1,   1,   2,   0,   0 },
21131       {  1,  -1,   2,  -4,   1 },
21132       {  1,   1,   0,   0,   2 },
21133       {  0,   0,   2,   6,   2 },
21134       {  4,   0,  -2,  -2,  -1 },
21135       {  2,   1,   0,  -4,  -1 },
21136 
21137    /* 411-420 */
21138       {  0,   0,   0,   3,   1 },
21139       {  1,  -1,  -2,   0,   0 },
21140       {  0,   0,   2,   1,   0 },
21141       {  1,   0,   0,   2,  -2 },
21142       {  3,  -1,   2,   2,   2 },
21143       {  3,  -1,   2,  -2,   2 },
21144       {  1,   0,   0,  -1,   2 },
21145       {  1,  -2,   2,  -2,   2 },
21146       {  0,   1,   0,   2,   2 },
21147       {  0,   1,  -2,  -1,  -2 },
21148 
21149    /* 421-430 */
21150       {  1,   1,  -2,   0,   0 },
21151       {  0,   2,   2,  -2,   0 },
21152       {  3,  -1,  -2,  -1,  -2 },
21153       {  1,   0,   0,  -6,   0 },
21154       {  1,   0,  -2,  -4,   0 },
21155       {  2,   1,   0,  -4,   1 },
21156       {  2,   0,   2,   0,  -1 },
21157       {  2,   0,  -4,   0,  -1 },
21158       {  0,   0,   3,   0,   2 },
21159       {  2,   1,  -2,  -2,  -1 },
21160 
21161    /* 431-440 */
21162       {  1,  -2,   0,   0,   1 },
21163       {  2,  -1,   0,  -4,   0 },
21164       {  0,   0,   0,   3,   0 },
21165       {  5,   0,   2,  -2,   2 },
21166       {  1,   2,  -2,  -4,  -2 },
21167       {  1,   0,   4,  -4,   2 },
21168       {  0,   0,   4,  -1,   2 },
21169       {  3,   1,   0,  -4,   0 },
21170       {  3,   0,   0,  -6,   0 },
21171       {  2,   0,   0,   2,   2 },
21172 
21173    /* 441-450 */
21174       {  2,  -2,   2,   0,   2 },
21175       {  1,   0,   0,  -3,   1 },
21176       {  1,  -2,  -2,   0,  -2 },
21177       {  1,  -1,  -2,  -3,  -2 },
21178       {  0,   0,   2,  -2,  -2 },
21179       {  2,   0,  -2,  -4,   0 },
21180       {  1,   0,  -4,   0,   0 },
21181       {  0,   1,   0,  -1,   0 },
21182       {  4,   0,   0,   0,  -1 },
21183       {  3,   0,   2,  -1,   2 },
21184 
21185    /* 451-460 */
21186       {  3,  -1,   2,   0,   1 },
21187       {  2,   0,   2,  -1,   1 },
21188       {  1,   2,   2,  -2,   1 },
21189       {  1,   1,   0,   2,  -1 },
21190       {  0,   2,   2,   0,   1 },
21191       {  3,   1,   2,   0,   1 },
21192       {  1,   1,   2,   1,   1 },
21193       {  1,   1,   0,  -1,   1 },
21194       {  1,  -2,   0,  -2,  -1 },
21195       {  4,   0,   0,  -4,   0 },
21196 
21197    /* 461-470 */
21198       {  2,   1,   0,   2,   0 },
21199       {  1,  -1,   0,   4,   0 },
21200       {  0,   1,   0,  -2,   2 },
21201       {  0,   0,   2,   0,  -2 },
21202       {  1,   0,  -1,   0,   1 },
21203       {  3,   0,   2,  -2,   0 },
21204       {  2,   0,   2,   2,   0 },
21205       {  1,   2,   0,  -4,   0 },
21206       {  1,  -1,   0,  -3,   0 },
21207       {  0,   1,   0,   4,   0 },
21208 
21209    /* 471 - 480 */
21210       {  0,   1,  -2,   0,   0 },
21211       {  2,   2,   2,  -2,   2 },
21212       {  0,   0,   0,   1,  -2 },
21213       {  0,   2,  -2,   0,  -1 },
21214       {  4,   0,   2,  -4,   2 },
21215       {  2,   0,  -4,   2,  -2 },
21216       {  2,  -1,  -2,   0,  -2 },
21217       {  1,   1,   4,  -2,   2 },
21218       {  1,   1,   2,  -4,   2 },
21219       {  1,   0,   2,   3,   2 },
21220 
21221    /* 481-490 */
21222       {  1,   0,   0,   4,  -1 },
21223       {  0,   0,   0,   4,   2 },
21224       {  2,   0,   0,   4,   0 },
21225       {  1,   1,  -2,   2,   0 },
21226       {  2,   1,   2,   1,   2 },
21227       {  2,   1,   2,  -4,   1 },
21228       {  2,   0,   2,   1,   1 },
21229       {  2,   0,  -4,  -2,  -1 },
21230       {  2,   0,  -2,  -6,  -1 },
21231       {  2,  -1,   2,  -1,   2 },
21232 
21233    /* 491-500 */
21234       {  1,  -2,   2,   0,   1 },
21235       {  1,  -2,   0,  -2,   1 },
21236       {  1,  -1,   0,  -4,  -1 },
21237       {  0,   2,   2,   2,   2 },
21238       {  0,   2,  -2,  -4,  -2 },
21239       {  0,   1,   2,   3,   2 },
21240       {  0,   1,   0,  -4,   1 },
21241       {  3,   0,   0,  -2,   1 },
21242       {  2,   1,  -2,   0,   1 },
21243       {  2,   0,   4,  -2,   1 },
21244 
21245    /* 501-510 */
21246       {  2,   0,   0,  -3,  -1 },
21247       {  2,  -2,   0,  -2,   1 },
21248       {  2,  -1,   2,  -2,   1 },
21249       {  1,   0,   0,  -6,  -1 },
21250       {  1,  -2,   0,   0,  -1 },
21251       {  1,  -2,  -2,  -2,  -1 },
21252       {  0,   1,   4,  -2,   1 },
21253       {  0,   0,   2,   3,   1 },
21254       {  2,  -1,   0,  -1,   0 },
21255       {  1,   3,   0,  -2,   0 },
21256 
21257    /* 511-520 */
21258       {  0,   3,   0,  -2,   0 },
21259       {  2,  -2,   2,  -2,   2 },
21260       {  0,   0,   4,  -2,   0 },
21261       {  4,  -1,   2,   0,   2 },
21262       {  2,   2,  -2,  -4,  -2 },
21263       {  4,   1,   2,   0,   2 },
21264       {  4,  -1,  -2,  -2,  -2 },
21265       {  2,   1,   0,  -2,  -2 },
21266       {  2,   1,  -2,  -6,  -2 },
21267       {  2,   0,   0,  -1,   1 },
21268 
21269    /* 521-530 */
21270       {  2,  -1,  -2,   2,  -1 },
21271       {  1,   1,  -2,   2,  -2 },
21272       {  1,   1,  -2,  -3,  -2 },
21273       {  1,   0,   3,   0,   3 },
21274       {  1,   0,  -2,   1,   1 },
21275       {  1,   0,  -2,   0,   2 },
21276       {  1,  -1,   2,   1,   2 },
21277       {  1,  -1,   0,   0,  -2 },
21278       {  1,  -1,  -4,   2,  -2 },
21279       {  0,   3,  -2,  -2,  -2 },
21280 
21281    /* 531-540 */
21282       {  0,   1,   0,   4,   1 },
21283       {  0,   0,   4,   2,   2 },
21284       {  3,   0,  -2,  -2,   0 },
21285       {  2,  -2,   0,   0,   0 },
21286       {  1,   1,   2,  -4,   0 },
21287       {  1,   1,   0,  -3,   0 },
21288       {  1,   0,   2,  -3,   0 },
21289       {  1,  -1,   2,  -2,   0 },
21290       {  0,   2,   0,   2,   0 },
21291       {  0,   0,   2,   4,   0 },
21292 
21293    /* 541-550 */
21294       {  1,   0,   1,   0,   0 },
21295       {  3,   1,   2,  -2,   1 },
21296       {  3,   0,   4,  -2,   2 },
21297       {  3,   0,   2,   1,   2 },
21298       {  3,   0,   0,   2,  -1 },
21299       {  3,   0,   0,   0,   2 },
21300       {  3,   0,  -2,   2,  -1 },
21301       {  2,   0,   4,  -4,   2 },
21302       {  2,   0,   2,  -3,   2 },
21303       {  2,   0,   0,   4,   1 },
21304 
21305    /* 551-560 */
21306       {  2,   0,   0,  -3,   1 },
21307       {  2,   0,  -4,   2,  -1 },
21308       {  2,   0,  -2,  -2,   1 },
21309       {  2,  -2,   2,   2,   2 },
21310       {  2,  -2,   0,  -2,  -2 },
21311       {  2,  -1,   0,   2,   1 },
21312       {  2,  -1,   0,   2,  -1 },
21313       {  1,   1,   2,   4,   2 },
21314       {  1,   1,   0,   1,   1 },
21315       {  1,   1,   0,   1,  -1 },
21316 
21317    /* 561-570 */
21318       {  1,   1,  -2,  -6,  -2 },
21319       {  1,   0,   0,  -3,  -1 },
21320       {  1,   0,  -4,  -2,  -1 },
21321       {  1,   0,  -2,  -6,  -1 },
21322       {  1,  -2,   2,   2,   1 },
21323       {  1,  -2,  -2,   2,  -1 },
21324       {  1,  -1,  -2,  -4,  -1 },
21325       {  0,   2,   0,   0,   2 },
21326       {  0,   1,   2,  -4,   2 },
21327       {  0,   1,  -2,   4,  -1 },
21328 
21329    /* 571-580 */
21330       {  5,   0,   0,   0,   0 },
21331       {  3,   0,   0,  -3,   0 },
21332       {  2,   2,   0,  -4,   0 },
21333       {  1,  -1,   2,   2,   0 },
21334       {  0,   1,   0,   3,   0 },
21335       {  4,   0,  -2,   0,  -1 },
21336       {  3,   0,  -2,  -6,  -1 },
21337       {  3,   0,  -2,  -1,  -1 },
21338       {  2,   1,   2,   2,   1 },
21339       {  2,   1,   0,   2,   1 },
21340 
21341    /* 581-590 */
21342       {  2,   0,   2,   4,   1 },
21343       {  2,   0,   2,  -6,   1 },
21344       {  2,   0,   2,  -2,  -1 },
21345       {  2,   0,   0,  -6,  -1 },
21346       {  2,  -1,  -2,  -2,  -1 },
21347       {  1,   2,   2,   0,   1 },
21348       {  1,   2,   0,   0,   1 },
21349       {  1,   0,   4,   0,   1 },
21350       {  1,   0,   2,  -6,   1 },
21351       {  1,   0,   2,  -4,  -1 },
21352 
21353    /* 591-600 */
21354       {  1,   0,  -1,  -2,  -1 },
21355       {  1,  -1,   2,   4,   1 },
21356       {  1,  -1,   2,  -3,   1 },
21357       {  1,  -1,   0,   4,   1 },
21358       {  1,  -1,  -2,   1,  -1 },
21359       {  0,   1,   2,  -2,   3 },
21360       {  3,   0,   0,  -2,   0 },
21361       {  1,   0,   1,  -2,   0 },
21362       {  0,   2,   0,  -4,   0 },
21363       {  0,   0,   2,  -4,   0 },
21364 
21365    /* 601-610 */
21366       {  0,   0,   1,  -1,   0 },
21367       {  0,   0,   0,   6,   0 },
21368       {  0,   2,   0,   0,  -2 },
21369       {  0,   1,  -2,   2,  -3 },
21370       {  4,   0,   0,   2,   0 },
21371       {  3,   0,   0,  -1,   0 },
21372       {  3,  -1,   0,   2,   0 },
21373       {  2,   1,   0,   1,   0 },
21374       {  2,   1,   0,  -6,   0 },
21375       {  2,  -1,   2,   0,   0 },
21376 
21377    /* 611-620 */
21378       {  1,   0,   2,  -1,   0 },
21379       {  1,  -1,   0,   1,   0 },
21380       {  1,  -1,  -2,  -2,   0 },
21381       {  0,   1,   2,   2,   0 },
21382       {  0,   0,   2,  -3,   0 },
21383       {  2,   2,   0,  -2,  -1 },
21384       {  2,  -1,  -2,   0,   1 },
21385       {  1,   2,   2,  -4,   1 },
21386       {  0,   1,   4,  -4,   2 },
21387       {  0,   0,   0,   3,   2 },
21388 
21389    /* 621-630 */
21390       {  5,   0,   2,   0,   1 },
21391       {  4,   1,   2,  -2,   2 },
21392       {  4,   0,  -2,  -2,   0 },
21393       {  3,   1,   2,   2,   2 },
21394       {  3,   1,   0,  -2,   0 },
21395       {  3,   1,  -2,  -6,  -2 },
21396       {  3,   0,   0,   0,  -2 },
21397       {  3,   0,  -2,  -4,  -2 },
21398       {  3,  -1,   0,  -3,   0 },
21399       {  3,  -1,   0,  -2,   0 },
21400 
21401    /* 631-640 */
21402       {  2,   1,   2,   0,   0 },
21403       {  2,   1,   2,  -4,   2 },
21404       {  2,   1,   2,  -2,   0 },
21405       {  2,   1,   0,  -3,   0 },
21406       {  2,   1,  -2,   0,  -2 },
21407       {  2,   0,   0,  -4,   2 },
21408       {  2,   0,   0,  -4,  -2 },
21409       {  2,   0,  -2,  -5,  -2 },
21410       {  2,  -1,   2,   4,   2 },
21411       {  2,  -1,   0,  -2,   2 },
21412 
21413    /* 641-650 */
21414       {  1,   3,  -2,  -2,  -2 },
21415       {  1,   1,   0,   0,  -2 },
21416       {  1,   1,   0,  -6,   0 },
21417       {  1,   1,  -2,   1,  -2 },
21418       {  1,   1,  -2,  -1,  -2 },
21419       {  1,   0,   2,   1,   0 },
21420       {  1,   0,   0,   3,   0 },
21421       {  1,   0,   0,  -4,   2 },
21422       {  1,   0,  -2,   4,  -2 },
21423       {  1,  -2,   0,  -1,   0 },
21424 
21425    /* 651-NFLS */
21426       {  0,   1,  -4,   2,  -1 },
21427       {  1,   0,  -2,   0,  -3 },
21428       {  0,   0,   4,  -4,   4 }
21429    };
21430     }
21431 
21432 
21433     /* Fundamental-argument multipliers:  planetary terms */
21434       private static final int mfapl[][] = {
21435 
21436        /* 1-10 */
21437           {  0,  0,  1, -1,  1,  0,  0, -1,  0, -2,  5,  0,  0,  0 },
21438           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  2, -5,  0,  0, -1 },
21439           {  0,  0,  0,  0,  0,  0,  3, -5,  0,  0,  0,  0,  0, -2 },
21440           {  0,  0,  1, -1,  1,  0, -8, 12,  0,  0,  0,  0,  0,  0 },
21441           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  2,  0,  0,  0,  2 },
21442           {  0,  0,  0,  0,  0,  0,  0,  4, -8,  3,  0,  0,  0,  0 },
21443           {  0,  0,  0,  0,  0,  0,  1, -1,  0,  0,  0,  0,  0,  0 },
21444           {  0,  0,  0,  0,  0,  0,  0,  8,-16,  4,  5,  0,  0,  0 },
21445           {  0,  0,  0,  0,  0,  0,  0,  1,  0, -1,  0,  0,  0,  0 },
21446           {  0,  0,  0,  0,  1,  0,  0, -1,  2,  0,  0,  0,  0,  0 },
21447 
21448        /* 11-20 */
21449           {  0,  0,  0,  0,  0,  0,  8,-13,  0,  0,  0,  0,  0, -1 },
21450           {  0,  0,  1, -1,  1,  0,  0, -1,  0,  2, -5,  0,  0,  0 },
21451           {  0,  0,  2, -2,  1,  0, -5,  6,  0,  0,  0,  0,  0,  0 },
21452           {  0,  0,  0,  0,  0,  0,  4, -6,  0,  0,  0,  0,  0, -2 },
21453           {  0,  0,  0,  0,  0,  0,  0,  3,  0, -1,  0,  0,  0,  2 },
21454           {  0,  0,  0,  0,  0,  0,  0,  2, -8,  3,  0,  0,  0, -2 },
21455           {  0,  0,  0,  0,  0,  0,  2, -4,  0,  0,  0,  0,  0, -2 },
21456           {  0,  0,  0,  0,  0,  0,  0,  6, -8,  3,  0,  0,  0,  2 },
21457           {  0,  0,  0,  0,  0,  0,  0,  1, -2,  0,  0,  0,  0,  0 },
21458           {  0,  0,  0,  0,  0,  0,  2, -3,  0,  0,  0,  0,  0,  0 },
21459 
21460        /* 21-30 */
21461           {  0,  0,  0,  0,  0,  0,  2, -2,  0,  0,  0,  0,  0,  0 },
21462           {  0,  0,  0,  0,  0,  0,  2,  0,  0,  0,  0,  0,  0,  2 },
21463           {  0,  0,  0,  0,  1,  0,  0, -4,  8, -3,  0,  0,  0,  0 },
21464           {  0,  0,  0,  0,  1,  0,  0,  4, -8,  3,  0,  0,  0,  0 },
21465           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  2, -5,  0,  0,  0 },
21466           {  0,  0,  0,  0,  0,  0,  1,  1,  0,  0,  0,  0,  0,  2 },
21467           {  0,  0,  1, -1,  1,  0,  0,  0, -2,  0,  0,  0,  0,  0 },
21468           {  2,  0,  0, -2, -1,  0,  0, -2,  0,  2,  0,  0,  0,  0 },
21469           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  2,  0,  0,  0,  1 },
21470           {  2,  0,  0, -2,  0,  0,  0, -2,  0,  2,  0,  0,  0,  0 },
21471 
21472        /* 31-40 */
21473           {  0,  0,  0,  0,  0,  0,  0,  2,  0, -2,  0,  0,  0,  0 },
21474           {  0,  0,  0,  0,  0,  0,  8,-13,  0,  0,  0,  0,  0,  0 },
21475           {  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  0,  0,  2 },
21476           {  0,  0,  0,  0,  0,  0,  5, -8,  0,  0,  0,  0,  0, -2 },
21477           {  0,  0,  0,  0,  0,  0,  0,  2, -2,  0,  0,  0,  0,  0 },
21478           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  2, -5,  0,  0,  1 },
21479           {  2,  0,  0, -2,  0,  0,  0, -2,  0,  3,  0,  0,  0,  0 },
21480           {  0,  0,  1, -1,  1,  0,  0, -1,  0, -1,  0,  0,  0,  0 },
21481           {  0,  0,  0,  0,  0,  0,  3, -4,  0,  0,  0,  0,  0,  0 },
21482           {  0,  0,  1, -1,  1,  0,  0, -1,  0,  0, -1,  0,  0,  0 },
21483 
21484        /* 41-50 */
21485           {  0,  0,  0,  0,  0,  0,  0,  1,  0, -2,  0,  0,  0,  0 },
21486           {  0,  0,  0,  0,  0,  0,  5, -7,  0,  0,  0,  0,  0, -2 },
21487           {  0,  0,  1, -1,  0,  0,  0,  0, -2,  0,  0,  0,  0,  0 },
21488           {  0,  0,  0,  0,  0,  0,  0,  4,  0, -2,  0,  0,  0,  2 },
21489           {  0,  0,  0,  0,  0,  0,  8,-13,  0,  0,  0,  0,  0, -2 },
21490           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  0,  0,  0 },
21491           {  0,  0,  0,  0,  0,  0,  2, -1,  0,  0,  0,  0,  0,  2 },
21492           {  1,  0,  0,  0,  0,  0,-18, 16,  0,  0,  0,  0,  0,  0 },
21493           {  0,  0,  1, -1,  1,  0,  0, -1,  0,  2,  0,  0,  0,  0 },
21494           {  0,  0,  0,  0,  0,  0,  0,  2,  0,  1,  0,  0,  0,  2 },
21495 
21496        /* 51-60 */
21497           {  0,  0,  1, -1,  1,  0, -5,  7,  0,  0,  0,  0,  0,  0 },
21498           {  1,  0,  0,  0,  0,  0,-10,  3,  0,  0,  0,  0,  0,  0 },
21499           {  0,  0,  2, -2,  0,  0, -5,  6,  0,  0,  0,  0,  0,  0 },
21500           {  0,  0,  0,  0,  0,  0,  0,  2,  0, -1,  0,  0,  0,  2 },
21501           {  1,  0,  2,  0,  2,  0,  0,  1,  0,  0,  0,  0,  0,  0 },
21502           {  0,  0,  0,  0,  0,  0,  0,  4, -2,  0,  0,  0,  0,  2 },
21503           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  2,  0,  0,  1 },
21504           {  1,  0, -2,  0, -2,  0,  0,  4, -8,  3,  0,  0,  0,  0 },
21505           {  0,  0,  1, -1,  1,  0,  0, -1,  0,  0,  2,  0,  0,  0 },
21506           {  0,  0,  2, -2,  1,  0, -3,  3,  0,  0,  0,  0,  0,  0 },
21507 
21508        /* 61-70 */
21509           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  2,  0,  0,  2 },
21510           {  0,  0,  0,  0,  0,  0,  0,  8,-16,  4,  5,  0,  0, -2 },
21511           {  0,  0,  1, -1,  1,  0,  0,  3, -8,  3,  0,  0,  0,  0 },
21512           {  0,  0,  0,  0,  0,  0,  8,-11,  0,  0,  0,  0,  0, -2 },
21513           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  3,  0,  0,  0,  2 },
21514           {  0,  0,  0,  0,  0,  0,  0,  8,-16,  4,  5,  0,  0,  2 },
21515           {  0,  0,  0,  0,  0,  0,  1, -1,  0,  0,  0,  0,  0, -1 },
21516           {  0,  0,  0,  0,  0,  0,  4, -6,  0,  0,  0,  0,  0, -1 },
21517           {  0,  0,  0,  0,  0,  0,  0,  1,  0, -3,  0,  0,  0, -2 },
21518           {  0,  0,  0,  0,  0,  0,  0,  2, -4,  0,  0,  0,  0,  0 },
21519 
21520        /* 71-80 */
21521           {  0,  0,  0,  0,  0,  0,  6, -8,  0,  0,  0,  0,  0, -2 },
21522           {  0,  0,  0,  0,  0,  0,  3, -2,  0,  0,  0,  0,  0,  2 },
21523           {  0,  0,  0,  0,  0,  0,  8,-15,  0,  0,  0,  0,  0, -2 },
21524           {  0,  0,  0,  0,  0,  0,  2, -5,  0,  0,  0,  0,  0, -2 },
21525           {  0,  0,  0,  0,  0,  0,  1, -3,  0,  0,  0,  0,  0, -2 },
21526           {  0,  0,  0,  0,  0,  0,  0,  3,  0, -2,  0,  0,  0,  2 },
21527           {  0,  0,  1, -1,  1,  0,  0, -5,  8, -3,  0,  0,  0,  0 },
21528           {  0,  0,  0,  0,  0,  0,  0,  1,  2,  0,  0,  0,  0,  2 },
21529           {  0,  0,  0,  0,  0,  0,  0,  3, -2,  0,  0,  0,  0,  2 },
21530           {  0,  0,  0,  0,  0,  0,  3, -5,  0,  0,  0,  0,  0,  0 },
21531 
21532        /* 81-90 */
21533           {  2,  0,  0, -2,  1,  0,  0, -2,  0,  3,  0,  0,  0,  0 },
21534           {  0,  0,  0,  0,  0,  0,  5, -8,  0,  0,  0,  0,  0, -1 },
21535           {  2,  0,  0, -2,  0,  0, -3,  3,  0,  0,  0,  0,  0,  0 },
21536           {  0,  0,  0,  0,  1,  0,  8,-13,  0,  0,  0,  0,  0,  0 },
21537           {  0,  0,  0,  0,  1,  0,  0,  0,  0, -2,  5,  0,  0,  0 },
21538           {  1,  0,  0, -1,  0,  0, -3,  4,  0,  0,  0,  0,  0,  0 },
21539           {  0,  0,  0,  0,  0,  0,  0,  2,  0,  0,  0,  0,  0,  2 },
21540           {  1,  0,  0,  0, -1,  0,-18, 16,  0,  0,  0,  0,  0,  0 },
21541           {  0,  0,  0,  0,  1,  0,  0,  0,  0,  2, -5,  0,  0,  0 },
21542           {  0,  0,  0,  0,  1,  0,  0,  0,  0,  1,  0,  0,  0,  0 },
21543 
21544        /* 91-100 */
21545           {  1,  0,  0, -2,  0,  0, 19,-21,  3,  0,  0,  0,  0,  0 },
21546           {  0,  0,  0,  0,  1,  0, -8, 13,  0,  0,  0,  0,  0,  0 },
21547           {  0,  0,  1, -1,  1,  0,  0, -1,  0,  0,  1,  0,  0,  0 },
21548           {  0,  0,  0,  0,  0,  0,  7, -9,  0,  0,  0,  0,  0, -2 },
21549           {  0,  0,  0,  0,  0,  0,  0,  0,  2,  0,  0,  0,  0,  2 },
21550           {  1,  0,  0,  0,  1,  0,-18, 16,  0,  0,  0,  0,  0,  0 },
21551           {  0,  0,  0,  0,  0,  0,  2, -4,  0,  0,  0,  0,  0, -1 },
21552           {  0,  0,  0,  0,  0,  0,  0,  6,-16,  4,  5,  0,  0, -2 },
21553           {  0,  0,  0,  0,  0,  0,  4, -7,  0,  0,  0,  0,  0, -2 },
21554           {  0,  0,  0,  0,  0,  0,  3, -7,  0,  0,  0,  0,  0, -2 },
21555 
21556        /* 101-110 */
21557           {  0,  0,  0,  0,  0,  0,  2, -2,  0,  0,  0,  0,  0, -1 },
21558           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  0,  0,  1 },
21559           {  2,  0,  0, -2,  1,  0,  0, -2,  0,  2,  0,  0,  0,  0 },
21560           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  0,  0, -1 },
21561           {  0,  0,  0,  0,  0,  0,  0,  3, -4,  0,  0,  0,  0,  0 },
21562           {  0,  0,  0,  0,  0,  0,  1, -2,  0,  0,  0,  0,  0,  0 },
21563           {  2,  0,  0, -2, -1,  0,  0, -2,  0,  3,  0,  0,  0,  0 },
21564           {  0,  0,  0,  0,  0,  0,  3, -3,  0,  0,  0,  0,  0,  0 },
21565           {  0,  0,  0,  0,  0,  0,  0,  2,  0,  0,  0,  0,  0,  0 },
21566           {  0,  0,  0,  0,  0,  0,  0,  1,  0,  2,  0,  0,  0,  2 },
21567 
21568        /* 111-120 */
21569           {  0,  0,  0,  0,  1,  0,  0,  1, -2,  0,  0,  0,  0,  0 },
21570           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  0,  0,  2 },
21571           {  0,  0,  2, -2,  1,  0,  0, -2,  0,  2,  0,  0,  0,  0 },
21572           {  0,  0,  0,  0,  0,  0,  0,  2,  0, -3,  0,  0,  0,  0 },
21573           {  0,  0,  0,  0,  0,  0,  3, -5,  0,  0,  0,  0,  0, -1 },
21574           {  0,  0,  0,  0,  0,  0,  3, -3,  0,  0,  0,  0,  0,  2 },
21575           {  0,  0,  0,  0,  0,  0,  4, -4,  0,  0,  0,  0,  0,  0 },
21576           {  0,  0,  1, -1,  0,  0,  0, -1,  0, -1,  0,  0,  0,  0 },
21577           {  2,  0,  0, -2,  0,  0, -6,  8,  0,  0,  0,  0,  0,  0 },
21578           {  0,  0,  1, -1,  1,  0,  0, -2,  2,  0,  0,  0,  0,  0 },
21579 
21580        /* 121-130 */
21581           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  0,  1 },
21582           {  0,  0,  1, -1,  1,  0,  0, -1,  0,  1,  0,  0,  0,  0 },
21583           {  0,  0,  0,  0,  0,  0,  0,  1, -2,  0,  0,  0,  0, -1 },
21584           {  0,  0,  0,  0,  0,  0,  0,  2, -3,  0,  0,  0,  0,  0 },
21585           {  0,  0,  0,  0,  0,  0,  0,  2, -4,  0,  0,  0,  0, -2 },
21586           {  0,  0,  0,  0,  0,  0,  0,  1,  0,  0, -1,  0,  0,  0 },
21587           {  0,  0,  0,  0,  0,  0,  8,-10,  0,  0,  0,  0,  0, -2 },
21588           {  0,  0,  1, -1,  1,  0, -3,  4,  0,  0,  0,  0,  0,  0 },
21589           {  0,  0,  0,  0,  0,  0,  6, -9,  0,  0,  0,  0,  0, -2 },
21590           {  1,  0,  0, -1,  1,  0,  0, -1,  0,  2,  0,  0,  0,  0 },
21591 
21592        /* 131-140 */
21593           {  0,  0,  0,  0,  0,  0,  5, -7,  0,  0,  0,  0,  0, -1 },
21594           {  0,  0,  0,  0,  0,  0,  5, -5,  0,  0,  0,  0,  0,  0 },
21595           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  0, -1 },
21596           {  0,  0,  0,  0,  0,  0,  3, -3,  0,  0,  0,  0,  0, -1 },
21597           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  0,  0 },
21598           {  0,  0,  0,  0,  0,  0,  0,  0,  4,  0,  0,  0,  0,  2 },
21599           {  0,  0,  0,  0,  0,  0,  0,  4,  0, -3,  0,  0,  0,  2 },
21600           {  0,  0,  0,  0,  0,  0,  1, -1,  0,  0,  0,  0,  0,  1 },
21601           {  0,  0,  0,  0,  0,  0,  0,  2,  0,  0,  0,  0,  0,  1 },
21602           {  0,  0,  0,  0,  1,  0,  2, -3,  0,  0,  0,  0,  0,  0 },
21603 
21604        /* 141-150 */
21605           {  1,  0,  0, -1,  0,  0,  0, -1,  0,  1,  0,  0,  0,  0 },
21606           {  0,  0,  0,  0,  0,  0,  1, -3,  0,  0,  0,  0,  0, -1 },
21607           {  0,  0,  0,  0,  0,  0,  0,  5, -4,  0,  0,  0,  0,  2 },
21608           {  0,  0,  0,  0,  0,  0,  0,  4, -4,  0,  0,  0,  0,  2 },
21609           {  0,  0,  0,  0,  0,  0,  9,-11,  0,  0,  0,  0,  0, -2 },
21610           {  0,  0,  0,  0,  0,  0,  2, -3,  0,  0,  0,  0,  0, -1 },
21611           {  0,  0,  0,  0,  0,  0,  0,  8,-15,  0,  0,  0,  0,  0 },
21612           {  0,  0,  1, -1,  1,  0, -4,  5,  0,  0,  0,  0,  0,  0 },
21613           {  0,  0,  0,  0,  0,  0,  4, -6,  0,  0,  0,  0,  0,  0 },
21614           {  0,  0,  0,  0,  0,  0,  0,  4,  0, -1,  0,  0,  0,  2 },
21615 
21616        /* 151-160 */
21617           {  1,  0,  0, -1,  1,  0, -3,  4,  0,  0,  0,  0,  0,  0 },
21618           {  0,  0,  1,  1,  1,  0,  0,  1,  0,  0,  0,  0,  0,  0 },
21619           {  0,  0,  1, -1,  1,  0,  0, -1,  0, -4, 10,  0,  0,  0 },
21620           {  0,  0,  0,  0,  1,  0,  1, -1,  0,  0,  0,  0,  0,  0 },
21621           {  0,  0,  1, -1,  0,  0,  0, -1,  0,  0, -1,  0,  0,  0 },
21622           {  0,  0,  0,  0,  0,  0,  0,  1,  0, -3,  0,  0,  0,  0 },
21623           {  0,  0,  0,  0,  0,  0,  3, -1,  0,  0,  0,  0,  0,  2 },
21624           {  0,  0,  0,  0,  0,  0,  0,  1,  0, -4,  0,  0,  0, -2 },
21625           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  2, -5,  0,  0, -2 },
21626           {  0,  0,  2, -2,  1,  0, -4,  4,  0,  0,  0,  0,  0,  0 },
21627 
21628        /* 161-170 */
21629           {  0,  0,  0,  0,  0,  0,  0,  3,  0,  0, -1,  0,  0,  2 },
21630           {  0,  0,  0,  0,  0,  0,  0,  4, -3,  0,  0,  0,  0,  2 },
21631           {  0,  0,  1, -1,  1,  0,  0, -1,  0,  0,  0,  0,  2,  0 },
21632           {  0,  0,  0,  0,  0,  0,  4, -4,  0,  0,  0,  0,  0, -1 },
21633           {  0,  0,  0,  0,  0,  0,  0,  2, -4,  0,  0,  0,  0, -1 },
21634           {  0,  0,  0,  0,  0,  0,  5, -8,  0,  0,  0,  0,  0,  0 },
21635           {  0,  0,  0,  0,  0,  0,  0,  1, -2,  0,  0,  0,  0,  1 },
21636           {  0,  0,  0,  0,  1,  0,  0,  0,  0,  0,  1,  0,  0,  0 },
21637           {  0,  0,  2, -2,  1,  0,  0, -9, 13,  0,  0,  0,  0,  0 },
21638           {  2,  0,  2,  0,  2,  0,  0,  2,  0, -3,  0,  0,  0,  0 },
21639 
21640        /* 171-180 */
21641           {  0,  0,  0,  0,  0,  0,  3, -6,  0,  0,  0,  0,  0, -2 },
21642           {  0,  0,  1, -1,  2,  0,  0, -1,  0,  0,  2,  0,  0,  0 },
21643           {  1,  0,  0, -1, -1,  0, -3,  4,  0,  0,  0,  0,  0,  0 },
21644           {  0,  0,  0,  0,  0,  0,  0,  3, -6,  0,  0,  0,  0, -2 },
21645           {  0,  0,  0,  0,  0,  0,  6, -6,  0,  0,  0,  0,  0,  0 },
21646           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  3,  0,  0,  0,  1 },
21647           {  1,  0,  2,  0,  1,  0,  0, -2,  0,  3,  0,  0,  0,  0 },
21648           {  1,  0, -2,  0, -1,  0,  0, -1,  0,  0,  0,  0,  0,  0 },
21649           {  0,  0,  0,  0,  1,  0,  0, -2,  4,  0,  0,  0,  0,  0 },
21650           {  0,  0,  0,  0,  0,  0,  0,  3, -5,  0,  0,  0,  0,  0 },
21651 
21652        /* 181-190 */
21653           {  0,  0,  0,  0,  0,  0,  2,  1,  0,  0,  0,  0,  0,  2 },
21654           {  0,  0,  0,  0,  0,  0,  1,  1,  0,  0,  0,  0,  0,  1 },
21655           {  0,  0,  2,  0,  2,  0,  0,  1,  0,  0,  0,  0,  0,  0 },
21656           {  0,  0,  0,  0,  0,  0,  0,  1, -8,  3,  0,  0,  0, -2 },
21657           {  0,  0,  0,  0,  0,  0,  6,-10,  0,  0,  0,  0,  0, -2 },
21658           {  0,  0,  0,  0,  0,  0,  0,  7, -8,  3,  0,  0,  0,  2 },
21659           {  0,  0,  0,  0,  1,  0, -3,  5,  0,  0,  0,  0,  0,  0 },
21660           {  0,  0,  1, -1,  1,  0, -1,  0,  0,  0,  0,  0,  0,  0 },
21661           {  0,  0,  1, -1,  0,  0, -5,  7,  0,  0,  0,  0,  0,  0 },
21662           {  0,  0,  0,  0,  0,  0,  0,  2,  0, -2,  0,  0,  0,  1 },
21663 
21664        /* 191-200 */
21665           {  0,  0,  0,  0,  0,  0,  0,  2,  0, -1,  0,  0,  0,  0 },
21666           {  0,  0,  0,  0,  0,  0,  7,-10,  0,  0,  0,  0,  0, -2 },
21667           {  1,  0,  0, -2,  0,  0,  0, -2,  0,  2,  0,  0,  0,  0 },
21668           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  2,  0,  0,  0,  0 },
21669           {  0,  0,  0,  0,  0,  0,  0,  1,  0,  2, -5,  0,  0,  0 },
21670           {  0,  0,  0,  0,  0,  0,  6, -8,  0,  0,  0,  0,  0, -1 },
21671           {  0,  0,  1, -1,  1,  0,  0, -9, 15,  0,  0,  0,  0,  0 },
21672           {  0,  0,  0,  0,  1,  0, -2,  3,  0,  0,  0,  0,  0,  0 },
21673           {  0,  0,  0,  0,  1,  0, -1,  1,  0,  0,  0,  0,  0,  0 },
21674           {  0,  0,  0,  0,  0,  0,  0,  3, -6,  0,  0,  0,  0,  0 },
21675 
21676        /* 201-210 */
21677           {  0,  0,  0,  0,  0,  0,  0,  1, -4,  0,  0,  0,  0, -2 },
21678           {  0,  0,  0,  0,  0,  0,  0,  0,  3,  0,  0,  0,  0,  2 },
21679           {  0,  0,  0,  0,  0,  0,  0,  2,  0,  0, -1,  0,  0,  2 },
21680           {  2,  0,  0, -2,  1,  0, -6,  8,  0,  0,  0,  0,  0,  0 },
21681           {  0,  0,  0,  0,  0,  0,  5, -5,  0,  0,  0,  0,  0, -1 },
21682           {  0,  0,  1, -1,  1,  0,  3, -6,  0,  0,  0,  0,  0,  0 },
21683           {  0,  0,  1, -1,  1,  0, -2,  2,  0,  0,  0,  0,  0,  0 },
21684           {  0,  0,  1, -1,  1,  0,  8,-14,  0,  0,  0,  0,  0,  0 },
21685           {  0,  0,  0,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0,  0 },
21686           {  0,  0,  0,  0,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0 },
21687 
21688        /* 211-220 */
21689           {  0,  0,  0,  0,  1,  0,  0,  8,-15,  0,  0,  0,  0,  0 },
21690           {  0,  0,  0,  0,  0,  0,  0,  4, -6,  0,  0,  0,  0,  0 },
21691           {  0,  0,  0,  0,  0,  0,  7, -7,  0,  0,  0,  0,  0,  0 },
21692           {  2,  0,  0, -2,  1,  0, -3,  3,  0,  0,  0,  0,  0,  0 },
21693           {  0,  0,  0,  0,  0,  0,  0,  3, -1,  0,  0,  0,  0,  2 },
21694           {  0,  0,  0,  0,  0,  0,  0,  2,  0,  0,  1,  0,  0,  2 },
21695           {  2,  0, -1, -1,  0,  0,  0,  3, -7,  0,  0,  0,  0,  0 },
21696           {  0,  0,  0,  0,  0,  0,  0,  4, -7,  0,  0,  0,  0, -2 },
21697           {  0,  0,  0,  0,  0,  0,  0,  3, -3,  0,  0,  0,  0,  0 },
21698           {  0,  0,  1, -1,  1,  0,  0, -3,  4,  0,  0,  0,  0,  0 },
21699 
21700        /* 221-230 */
21701           {  2,  0,  0, -2,  0,  0,  0, -6,  8,  0,  0,  0,  0,  0 },
21702           {  2,  0,  0, -2,  0,  0,  0, -5,  6,  0,  0,  0,  0,  0 },
21703           {  0,  0,  0,  0,  1,  0,  0,  0,  0, -1,  0,  0,  0,  0 },
21704           {  0,  0,  0,  0,  0,  0,  2,  0,  0,  0,  0,  0,  0,  1 },
21705           {  0,  0,  0,  0,  0,  0,  2,  1,  0,  0,  0,  0,  0,  1 },
21706           {  0,  0,  0,  0,  0,  0,  1,  2,  0,  0,  0,  0,  0,  2 },
21707           {  0,  0,  0,  0,  1,  0,  0,  1,  0, -1,  0,  0,  0,  0 },
21708           {  0,  0,  0,  0,  0,  0,  0,  1, -1,  0,  0,  0,  0,  0 },
21709           {  0,  0,  0,  0,  0,  0,  3, -9,  4,  0,  0,  0,  0, -2 },
21710           {  0,  0,  0,  0,  0,  0,  0,  3, -5,  0,  0,  0,  0, -2 },
21711 
21712        /* 231-240 */
21713           {  0,  0,  0,  0,  0,  0,  0,  2,  0, -4,  0,  0,  0, -2 },
21714           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  2,  1 },
21715           {  0,  0,  0,  0,  0,  0,  7,-11,  0,  0,  0,  0,  0, -2 },
21716           {  0,  0,  0,  0,  0,  0,  3, -5,  4,  0,  0,  0,  0,  2 },
21717           {  0,  0,  1, -1,  0,  0,  0, -1,  0, -1,  1,  0,  0,  0 },
21718           {  2,  0,  0,  0,  0,  0,  0, -2,  0,  3,  0,  0,  0,  0 },
21719           {  0,  0,  0,  0,  0,  0,  0,  8,-15,  0,  0,  0,  0, -2 },
21720           {  0,  0,  1, -1,  2,  0,  0, -2,  2,  0,  0,  0,  0,  0 },
21721           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  3,  0,  0,  2 },
21722           {  0,  0,  0,  0,  0,  0,  6, -6,  0,  0,  0,  0,  0, -1 },
21723 
21724        /* 241-250 */
21725           {  0,  0,  1, -1,  1,  0,  0, -1,  0, -1,  1,  0,  0,  0 },
21726           {  0,  0,  0,  0,  0,  0,  2, -2,  0,  0,  0,  0,  0,  1 },
21727           {  0,  0,  0,  0,  0,  0,  0,  4, -7,  0,  0,  0,  0,  0 },
21728           {  0,  0,  0,  0,  0,  0,  0,  3, -8,  3,  0,  0,  0,  0 },
21729           {  0,  0,  1, -1,  1,  0,  2, -4,  0, -3,  0,  0,  0,  0 },
21730           {  0,  0,  0,  0,  1,  0,  3, -5,  0,  2,  0,  0,  0,  0 },
21731           {  0,  0,  0,  0,  0,  0,  0,  3,  0, -3,  0,  0,  0,  2 },
21732           {  0,  0,  2, -2,  2,  0, -8, 11,  0,  0,  0,  0,  0,  0 },
21733           {  0,  0,  0,  0,  0,  0,  0,  5, -8,  3,  0,  0,  0,  0 },
21734           {  0,  0,  0,  0,  0,  0,  0,  1,  0,  0, -2,  0,  0,  0 },
21735 
21736        /* 251-260 */
21737           {  0,  0,  0,  0,  0,  0,  0,  1,  0,  0,  1,  0,  0,  2 },
21738           {  0,  0,  0,  0,  0,  0,  0,  5, -9,  0,  0,  0,  0, -2 },
21739           {  0,  0,  0,  0,  0,  0,  0,  5, -5,  0,  0,  0,  0,  2 },
21740           {  0,  0,  0,  0,  0,  0,  7, -9,  0,  0,  0,  0,  0, -1 },
21741           {  0,  0,  0,  0,  0,  0,  4, -7,  0,  0,  0,  0,  0, -1 },
21742           {  0,  0,  0,  0,  0,  0,  2, -1,  0,  0,  0,  0,  0,  0 },
21743           {  1,  0, -2, -2, -2,  0,  0, -2,  0,  2,  0,  0,  0,  0 },
21744           {  0,  0,  0,  0,  0,  0,  0,  1,  1,  0,  0,  0,  0,  2 },
21745           {  0,  0,  0,  0,  0,  0,  0,  2,  0, -2,  5,  0,  0,  2 },
21746           {  0,  0,  0,  0,  0,  0,  3, -3,  0,  0,  0,  0,  0,  1 },
21747 
21748        /* 261-270 */
21749           {  0,  0,  0,  0,  0,  0,  0,  6,  0,  0,  0,  0,  0,  2 },
21750           {  0,  0,  0,  0,  0,  0,  0,  2,  0,  2, -5,  0,  0,  2 },
21751           {  2,  0,  0, -2, -1,  0,  0, -2,  0,  0,  5,  0,  0,  0 },
21752           {  2,  0,  0, -2, -1,  0, -6,  8,  0,  0,  0,  0,  0,  0 },
21753           {  1,  0,  0, -2,  0,  0, -3,  3,  0,  0,  0,  0,  0,  0 },
21754           {  0,  0,  0,  0,  0,  0,  8, -8,  0,  0,  0,  0,  0,  0 },
21755           {  0,  0,  0,  0,  0,  0,  0,  3,  0,  2, -5,  0,  0,  2 },
21756           {  0,  0,  0,  0,  1,  0,  3, -7,  4,  0,  0,  0,  0,  0 },
21757           {  0,  0,  2, -2,  1,  0, -2,  2,  0,  0,  0,  0,  0,  0 },
21758           {  0,  0,  0,  0,  1,  0,  0, -1,  0,  1,  0,  0,  0,  0 },
21759 
21760        /* 271-280 */
21761           {  0,  0,  1, -1,  0,  0,  0, -1,  0, -2,  5,  0,  0,  0 },
21762           {  0,  0,  0,  0,  0,  0,  0,  3,  0, -3,  0,  0,  0,  0 },
21763           {  0,  0,  0,  0,  0,  0,  3, -1,  0,  0,  0,  0,  0,  1 },
21764           {  0,  0,  0,  0,  0,  0,  2, -3,  0,  0,  0,  0,  0, -2 },
21765           {  0,  0,  0,  0,  0,  0,  0, 11,  0,  0,  0,  0,  0,  2 },
21766           {  0,  0,  0,  0,  0,  0,  0,  6,-15,  0,  0,  0,  0, -2 },
21767           {  0,  0,  0,  0,  0,  0,  0,  3,  0,  1,  0,  0,  0,  2 },
21768           {  1,  0,  0, -1,  0,  0,  0, -3,  4,  0,  0,  0,  0,  0 },
21769           {  0,  0,  0,  0,  1,  0, -3,  7, -4,  0,  0,  0,  0,  0 },
21770           {  0,  0,  0,  0,  0,  0,  0,  5,  0, -2,  0,  0,  0,  2 },
21771 
21772        /* 281-290 */
21773           {  0,  0,  0,  0,  0,  0,  3, -5,  0,  0,  0,  0,  0,  1 },
21774           {  0,  0,  2, -2,  2,  0, -5,  6,  0,  0,  0,  0,  0,  0 },
21775           {  0,  0,  2, -2,  2,  0, -3,  3,  0,  0,  0,  0,  0,  0 },
21776           {  0,  0,  0,  0,  0,  0,  3,  0,  0,  0,  0,  0,  0,  2 },
21777           {  0,  0,  0,  0,  0,  0,  0,  6,  0,  0,  0,  0,  0,  0 },
21778           {  0,  0,  0,  0,  0,  0,  4, -4,  0,  0,  0,  0,  0,  2 },
21779           {  0,  0,  0,  0,  0,  0,  0,  4, -8,  0,  0,  0,  0, -2 },
21780           {  0,  0,  0,  0,  0,  0,  0,  4, -5,  0,  0,  0,  0,  0 },
21781           {  0,  0,  0,  0,  0,  0,  5, -7,  0,  0,  0,  0,  0,  0 },
21782           {  0,  0,  0,  0,  0,  0,  0,  6,-11,  0,  0,  0,  0, -2 },
21783 
21784        /* 291-300 */
21785           {  0,  0,  0,  0,  0,  0,  0,  1, -3,  0,  0,  0,  0, -2 },
21786           {  0,  0,  1, -1,  1,  0,  0, -1,  0,  3,  0,  0,  0,  0 },
21787           {  0,  0,  1, -1,  0,  0,  0, -1,  0,  2,  0,  0,  0,  0 },
21788           {  0,  0,  0,  0,  0,  0,  1, -2,  0,  0,  0,  0,  0,  1 },
21789           {  0,  0,  0,  0,  0,  0,  9,-12,  0,  0,  0,  0,  0, -2 },
21790           {  0,  0,  0,  0,  0,  0,  4, -4,  0,  0,  0,  0,  0,  1 },
21791           {  0,  0,  1, -1,  0,  0, -8, 12,  0,  0,  0,  0,  0,  0 },
21792           {  0,  0,  1, -1,  1,  0, -2,  3,  0,  0,  0,  0,  0,  0 },
21793           {  0,  0,  0,  0,  0,  0,  7, -7,  0,  0,  0,  0,  0, -1 },
21794           {  0,  0,  0,  0,  0,  0,  0,  3, -6,  0,  0,  0,  0, -1 },
21795 
21796        /* 301-310 */
21797           {  0,  0,  0,  0,  0,  0,  0,  6, -6,  0,  0,  0,  0,  2 },
21798           {  0,  0,  0,  0,  0,  1,  0, -4,  0,  0,  0,  0,  0, -2 },
21799           {  0,  0,  1, -1,  1,  0,  0,  1,  0,  0,  0,  0,  0,  0 },
21800           {  0,  0,  0,  0,  0,  0,  6, -9,  0,  0,  0,  0,  0, -1 },
21801           {  0,  0,  1, -1, -1,  0,  0,  0, -2,  0,  0,  0,  0,  0 },
21802           {  0,  0,  0,  0,  0,  0,  0,  1, -5,  0,  0,  0,  0, -2 },
21803           {  2,  0,  0, -2,  0,  0,  0, -2,  0,  3, -1,  0,  0,  0 },
21804           {  0,  0,  0,  0,  0,  0,  0,  2,  0,  0, -2,  0,  0,  0 },
21805           {  0,  0,  0,  0,  0,  0,  0,  5, -9,  0,  0,  0,  0,  0 },
21806           {  0,  0,  0,  0,  0,  0,  5, -6,  0,  0,  0,  0,  0,  2 },
21807 
21808        /* 311-320 */
21809           {  0,  0,  0,  0,  0,  0,  9, -9,  0,  0,  0,  0,  0, -1 },
21810           {  0,  0,  1, -1,  1,  0,  0, -1,  0,  0,  3,  0,  0,  0 },
21811           {  0,  0,  0,  0,  1,  0,  0,  2, -4,  0,  0,  0,  0,  0 },
21812           {  0,  0,  0,  0,  0,  0,  5, -3,  0,  0,  0,  0,  0,  2 },
21813           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  3,  0,  0,  1 },
21814           {  0,  0,  1, -1,  2,  0,  0, -1,  0,  2,  0,  0,  0,  0 },
21815           {  0,  0,  0,  0,  0,  0,  5, -9,  0,  0,  0,  0,  0, -2 },
21816           {  0,  0,  0,  0,  0,  0,  0,  5, -3,  0,  0,  0,  0,  2 },
21817           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  4,  0,  0,  0,  2 },
21818           {  0,  0,  2,  0,  2,  0,  0,  4, -8,  3,  0,  0,  0,  0 },
21819 
21820        /* 321-330 */
21821           {  0,  0,  2,  0,  2,  0,  0, -4,  8, -3,  0,  0,  0,  0 },
21822           {  0,  0,  0,  0,  0,  0,  0,  5,  0, -3,  0,  0,  0,  2 },
21823           {  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  0,  0,  0 },
21824           {  2,  0, -1, -1, -1,  0,  0, -1,  0,  3,  0,  0,  0,  0 },
21825           {  0,  0,  0,  0,  0,  0,  4, -3,  0,  0,  0,  0,  0,  2 },
21826           {  0,  0,  0,  0,  0,  0,  4, -2,  0,  0,  0,  0,  0,  2 },
21827           {  0,  0,  0,  0,  0,  0,  5,-10,  0,  0,  0,  0,  0, -2 },
21828           {  0,  0,  0,  0,  0,  0,  8,-13,  0,  0,  0,  0,  0,  1 },
21829           {  0,  0,  2, -2,  1, -1,  0,  2,  0,  0,  0,  0,  0,  0 },
21830           {  0,  0,  1, -1,  1,  0,  0, -1,  0,  0,  0,  2,  0,  0 },
21831 
21832        /* 331-340 */
21833           {  0,  0,  0,  0,  1,  0,  3, -5,  0,  0,  0,  0,  0,  0 },
21834           {  1,  0,  0, -2,  0,  0,  0, -2,  0,  3,  0,  0,  0,  0 },
21835           {  0,  0,  2, -2,  0,  0, -3,  3,  0,  0,  0,  0,  0,  0 },
21836           {  0,  0,  0,  0,  0,  0,  9, -9,  0,  0,  0,  0,  0,  0 },
21837           {  0,  0,  2,  0,  2,  0,  1, -1,  0,  0,  0,  0,  0,  0 },
21838           {  0,  0,  2, -2,  1,  0,  0, -8, 11,  0,  0,  0,  0,  0 },
21839           {  0,  0,  2, -2,  1,  0,  0, -2,  0,  0,  2,  0,  0,  0 },
21840           {  0,  0,  1, -1,  1,  0,  0, -1,  0, -1,  2,  0,  0,  0 },
21841           {  0,  0,  0,  0,  0,  0,  5, -5,  0,  0,  0,  0,  0,  2 },
21842           {  0,  0,  0,  0,  0,  0,  2, -6,  0,  0,  0,  0,  0, -2 },
21843 
21844        /* 341-350 */
21845           {  0,  0,  0,  0,  0,  0,  0,  8,-15,  0,  0,  0,  0, -1 },
21846           {  0,  0,  0,  0,  0,  0,  0,  5, -2,  0,  0,  0,  0,  2 },
21847           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  0,  2 },
21848           {  0,  0,  0,  0,  0,  0,  0,  7,-13,  0,  0,  0,  0, -2 },
21849           {  0,  0,  0,  0,  0,  0,  0,  3,  0, -2,  0,  0,  0,  0 },
21850           {  0,  0,  0,  0,  0,  0,  0,  1,  0,  3,  0,  0,  0,  2 },
21851           {  0,  0,  2, -2,  1,  0,  0, -2,  0,  3,  0,  0,  0,  0 },
21852           {  0,  0,  0,  0,  0,  0,  8, -8,  0,  0,  0,  0,  0, -1 },
21853           {  0,  0,  0,  0,  0,  0,  8,-10,  0,  0,  0,  0,  0, -1 },
21854           {  0,  0,  0,  0,  0,  0,  4, -2,  0,  0,  0,  0,  0,  1 },
21855 
21856        /* 351-360 */
21857           {  0,  0,  0,  0,  0,  0,  3, -6,  0,  0,  0,  0,  0, -1 },
21858           {  0,  0,  0,  0,  0,  0,  3, -4,  0,  0,  0,  0,  0, -1 },
21859           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  2, -5,  0,  0,  2 },
21860           {  0,  0,  0,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0,  2 },
21861           {  0,  0,  0,  0,  0,  0,  0,  2,  0, -4,  0,  0,  0,  0 },
21862           {  2,  0,  0, -2, -1,  0,  0, -5,  6,  0,  0,  0,  0,  0 },
21863           {  0,  0,  0,  0,  0,  0,  0,  2, -5,  0,  0,  0,  0, -2 },
21864           {  2,  0, -1, -1, -1,  0,  0,  3, -7,  0,  0,  0,  0,  0 },
21865           {  0,  0,  0,  0,  0,  0,  0,  5, -8,  0,  0,  0,  0,  0 },
21866           {  0,  0,  2,  0,  2,  0, -1,  1,  0,  0,  0,  0,  0,  0 },
21867 
21868        /* 361-370 */
21869           {  2,  0,  0, -2,  0,  0,  0, -2,  0,  4, -3,  0,  0,  0 },
21870           {  0,  0,  0,  0,  0,  0,  0,  6,-11,  0,  0,  0,  0,  0 },
21871           {  2,  0,  0, -2,  1,  0,  0, -6,  8,  0,  0,  0,  0,  0 },
21872           {  0,  0,  0,  0,  0,  0,  0,  4, -8,  1,  5,  0,  0, -2 },
21873           {  0,  0,  0,  0,  0,  0,  0,  6, -5,  0,  0,  0,  0,  2 },
21874           {  1,  0, -2, -2, -2,  0, -3,  3,  0,  0,  0,  0,  0,  0 },
21875           {  0,  0,  1, -1,  2,  0,  0,  0, -2,  0,  0,  0,  0,  0 },
21876           {  0,  0,  0,  0,  2,  0,  0,  4, -8,  3,  0,  0,  0,  0 },
21877           {  0,  0,  0,  0,  2,  0,  0, -4,  8, -3,  0,  0,  0,  0 },
21878           {  0,  0,  0,  0,  0,  0,  0,  6,  0,  0,  0,  0,  0,  1 },
21879 
21880        /* 371-380 */
21881           {  0,  0,  0,  0,  0,  0,  0,  6, -7,  0,  0,  0,  0,  2 },
21882           {  0,  0,  0,  0,  0,  0,  0,  4,  0,  0, -2,  0,  0,  2 },
21883           {  0,  0,  0,  0,  0,  0,  0,  3,  0,  0, -2,  0,  0,  2 },
21884           {  0,  0,  0,  0,  0,  0,  0,  1,  0, -1,  0,  0,  0,  1 },
21885           {  0,  0,  0,  0,  0,  0,  0,  1, -6,  0,  0,  0,  0, -2 },
21886           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  4, -5,  0,  0,  2 },
21887           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  2,  0,  2 },
21888           {  0,  0,  0,  0,  0,  0,  3, -5,  0,  2,  0,  0,  0,  0 },
21889           {  0,  0,  0,  0,  0,  0,  0,  7,-13,  0,  0,  0,  0,  0 },
21890           {  0,  0,  0,  0,  0,  0,  0,  2,  0, -2,  0,  0,  0,  2 },
21891 
21892        /* 381-390 */
21893           {  0,  0,  1, -1,  0,  0,  0, -1,  0,  0,  2,  0,  0,  0 },
21894           {  0,  0,  0,  0,  1,  0,  0, -8, 15,  0,  0,  0,  0,  0 },
21895           {  2,  0,  0, -2, -2,  0, -3,  3,  0,  0,  0,  0,  0,  0 },
21896           {  2,  0, -1, -1, -1,  0,  0, -1,  0,  2,  0,  0,  0,  0 },
21897           {  1,  0,  2, -2,  2,  0,  0, -2,  0,  2,  0,  0,  0,  0 },
21898           {  1,  0, -1,  1, -1,  0,-18, 17,  0,  0,  0,  0,  0,  0 },
21899           {  0,  0,  2,  0,  2,  0,  0,  1,  0, -1,  0,  0,  0,  0 },
21900           {  0,  0,  2,  0,  2,  0,  0, -1,  0,  1,  0,  0,  0,  0 },
21901           {  0,  0,  2, -2, -1,  0, -5,  6,  0,  0,  0,  0,  0,  0 },
21902           {  0,  0,  1, -1,  2,  0,  0, -1,  0,  1,  0,  0,  0,  0 },
21903 
21904        /* 391-400 */
21905           {  0,  0,  0,  0,  1,  0,  2, -2,  0,  0,  0,  0,  0,  0 },
21906           {  0,  0,  0,  0,  0,  0,  8,-16,  0,  0,  0,  0,  0, -2 },
21907           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  5,  0,  0,  2 },
21908           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  2,  2 },
21909           {  0,  0,  0,  0,  2,  0,  0, -1,  2,  0,  0,  0,  0,  0 },
21910           {  2,  0, -1, -1, -2,  0,  0, -1,  0,  2,  0,  0,  0,  0 },
21911           {  0,  0,  0,  0,  0,  0,  6,-10,  0,  0,  0,  0,  0, -1 },
21912           {  0,  0,  1, -1,  1,  0,  0, -1,  0, -2,  4,  0,  0,  0 },
21913           {  0,  0,  0,  0,  0,  0,  0,  2,  2,  0,  0,  0,  0,  2 },
21914           {  2,  0,  0, -2, -1,  0,  0, -2,  0,  4, -5,  0,  0,  0 },
21915 
21916        /* 401-410 */
21917           {  2,  0,  0, -2, -1,  0, -3,  3,  0,  0,  0,  0,  0,  0 },
21918           {  2,  0, -1, -1, -1,  0,  0, -1,  0,  0,  0,  0,  0,  0 },
21919           {  1,  0,  1, -1,  1,  0,  0, -1,  0,  0,  0,  0,  0,  0 },
21920           {  1,  0,  0, -1, -1,  0,  0, -2,  2,  0,  0,  0,  0,  0 },
21921           {  1,  0, -1, -1, -1,  0, 20,-20,  0,  0,  0,  0,  0,  0 },
21922           {  0,  0,  2, -2,  1,  0,  0, -1,  0,  1,  0,  0,  0,  0 },
21923           {  0,  0,  1, -1,  1,  0,  1, -2,  0,  0,  0,  0,  0,  0 },
21924           {  0,  0,  1, -1,  1,  0, -2,  1,  0,  0,  0,  0,  0,  0 },
21925           {  0,  0,  0,  0,  1,  0,  5, -8,  0,  0,  0,  0,  0,  0 },
21926           {  0,  0,  0,  0,  1,  0,  0,  0,  0,  0, -1,  0,  0,  0 },
21927 
21928        /* 411-420 */
21929           {  0,  0,  0,  0,  0,  0,  9,-11,  0,  0,  0,  0,  0, -1 },
21930           {  0,  0,  0,  0,  0,  0,  5, -3,  0,  0,  0,  0,  0,  1 },
21931           {  0,  0,  0,  0,  0,  0,  0,  1,  0, -3,  0,  0,  0, -1 },
21932           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  2,  0,  1 },
21933           {  0,  0,  0,  0,  0,  0,  6, -7,  0,  0,  0,  0,  0,  0 },
21934           {  0,  0,  0,  0,  0,  0,  0,  3, -2,  0,  0,  0,  0,  0 },
21935           {  0,  0,  0,  0,  0,  0,  1, -2,  0,  0,  0,  0,  0, -2 },
21936           {  0,  0,  1, -1,  1,  0,  0, -1,  0,  0, -2,  0,  0,  0 },
21937           {  0,  0,  1, -1,  2,  0,  0, -1,  0, -2,  5,  0,  0,  0 },
21938           {  0,  0,  0,  0,  0,  0,  0,  5, -7,  0,  0,  0,  0,  0 },
21939 
21940        /* 421-430 */
21941           {  0,  0,  0,  0,  0,  0,  1, -3,  0,  0,  0,  0,  0,  0 },
21942           {  0,  0,  0,  0,  0,  0,  0,  5, -8,  0,  0,  0,  0, -2 },
21943           {  0,  0,  0,  0,  0,  0,  0,  2, -6,  0,  0,  0,  0, -2 },
21944           {  1,  0,  0, -2,  0,  0, 20,-21,  0,  0,  0,  0,  0,  0 },
21945           {  0,  0,  0,  0,  0,  0,  8,-12,  0,  0,  0,  0,  0,  0 },
21946           {  0,  0,  0,  0,  0,  0,  5, -6,  0,  0,  0,  0,  0,  0 },
21947           {  0,  0,  0,  0,  0,  0,  0,  4, -4,  0,  0,  0,  0,  0 },
21948           {  0,  0,  1, -1,  2,  0,  0, -1,  0, -1,  0,  0,  0,  0 },
21949           {  0,  0,  0,  0,  0,  0,  8,-12,  0,  0,  0,  0,  0, -2 },
21950           {  0,  0,  0,  0,  0,  0,  0,  9,-17,  0,  0,  0,  0,  0 },
21951 
21952        /* 431-440 */
21953           {  0,  0,  0,  0,  0,  0,  0,  5, -6,  0,  0,  0,  0,  2 },
21954           {  0,  0,  0,  0,  0,  0,  0,  4, -8,  1,  5,  0,  0,  2 },
21955           {  0,  0,  0,  0,  0,  0,  0,  4, -6,  0,  0,  0,  0, -2 },
21956           {  0,  0,  0,  0,  0,  0,  0,  2, -7,  0,  0,  0,  0, -2 },
21957           {  1,  0,  0, -1,  1,  0,  0, -3,  4,  0,  0,  0,  0,  0 },
21958           {  1,  0, -2,  0, -2,  0,-10,  3,  0,  0,  0,  0,  0,  0 },
21959           {  0,  0,  0,  0,  1,  0,  0, -9, 17,  0,  0,  0,  0,  0 },
21960           {  0,  0,  0,  0,  0,  0,  1, -4,  0,  0,  0,  0,  0, -2 },
21961           {  1,  0, -2, -2, -2,  0,  0, -2,  0,  3,  0,  0,  0,  0 },
21962           {  1,  0, -1,  1, -1,  0,  0,  1,  0,  0,  0,  0,  0,  0 },
21963 
21964        /* 441-450 */
21965           {  0,  0,  2, -2,  2,  0,  0, -2,  0,  2,  0,  0,  0,  0 },
21966           {  0,  0,  1, -1,  2,  0,  0, -1,  0,  0,  1,  0,  0,  0 },
21967           {  0,  0,  1, -1,  2,  0, -5,  7,  0,  0,  0,  0,  0,  0 },
21968           {  0,  0,  0,  0,  1,  0,  0,  2, -2,  0,  0,  0,  0,  0 },
21969           {  0,  0,  0,  0,  0,  0,  4, -5,  0,  0,  0,  0,  0, -1 },
21970           {  0,  0,  0,  0,  0,  0,  3, -4,  0,  0,  0,  0,  0, -2 },
21971           {  0,  0,  0,  0,  0,  0,  2, -4,  0,  0,  0,  0,  0,  0 },
21972           {  0,  0,  0,  0,  0,  0,  0,  5,-10,  0,  0,  0,  0, -2 },
21973           {  0,  0,  0,  0,  0,  0,  0,  4,  0, -4,  0,  0,  0,  2 },
21974           {  0,  0,  0,  0,  0,  0,  0,  2,  0, -5,  0,  0,  0, -2 },
21975 
21976        /* 451-460 */
21977           {  0,  0,  0,  0,  0,  0,  0,  1,  0, -5,  0,  0,  0, -2 },
21978           {  0,  0,  0,  0,  0,  0,  0,  1,  0, -2,  5,  0,  0,  2 },
21979           {  0,  0,  0,  0,  0,  0,  0,  1,  0, -2,  0,  0,  0, -2 },
21980           {  0,  0,  0,  0,  0,  0,  2, -3,  0,  0,  0,  0,  0,  1 },
21981           {  1,  0,  0, -2,  0,  0,  0,  1,  0, -1,  0,  0,  0,  0 },
21982           {  0,  0,  0,  0,  0,  0,  3, -7,  4,  0,  0,  0,  0,  0 },
21983           {  2,  0,  2,  0,  1,  0,  0,  1,  0,  0,  0,  0,  0,  0 },
21984           {  0,  0,  1, -1, -1,  0,  0, -1,  0, -1,  0,  0,  0,  0 },
21985           {  0,  0,  0,  0,  1,  0,  0,  1,  0, -2,  0,  0,  0,  0 },
21986           {  0,  0,  0,  0,  0,  0,  0,  6,-10,  0,  0,  0,  0, -2 },
21987 
21988        /* 461-470 */
21989           {  1,  0,  0, -1,  1,  0,  0, -1,  0,  1,  0,  0,  0,  0 },
21990           {  0,  0,  2, -2,  1,  0,  0,  4, -8,  3,  0,  0,  0,  0 },
21991           {  0,  0,  2, -2,  1,  0,  0,  1,  0, -1,  0,  0,  0,  0 },
21992           {  0,  0,  2, -2,  1,  0,  0, -4,  8, -3,  0,  0,  0,  0 },
21993           {  0,  0,  2, -2,  1,  0,  0, -3,  0,  3,  0,  0,  0,  0 },
21994           {  0,  0,  2, -2,  1,  0, -5,  5,  0,  0,  0,  0,  0,  0 },
21995           {  0,  0,  1, -1,  1,  0,  1, -3,  0,  0,  0,  0,  0,  0 },
21996           {  0,  0,  1, -1,  1,  0,  0, -4,  6,  0,  0,  0,  0,  0 },
21997           {  0,  0,  1, -1,  1,  0,  0, -1,  0,  0,  0, -1,  0,  0 },
21998           {  0,  0,  1, -1,  1,  0, -5,  6,  0,  0,  0,  0,  0,  0 },
21999 
22000        /* 471-480 */
22001           {  0,  0,  0,  0,  1,  0,  3, -4,  0,  0,  0,  0,  0,  0 },
22002           {  0,  0,  0,  0,  1,  0, -2,  2,  0,  0,  0,  0,  0,  0 },
22003           {  0,  0,  0,  0,  0,  0,  7,-10,  0,  0,  0,  0,  0, -1 },
22004           {  0,  0,  0,  0,  0,  0,  5, -5,  0,  0,  0,  0,  0,  1 },
22005           {  0,  0,  0,  0,  0,  0,  4, -5,  0,  0,  0,  0,  0, -2 },
22006           {  0,  0,  0,  0,  0,  0,  3, -8,  0,  0,  0,  0,  0, -2 },
22007           {  0,  0,  0,  0,  0,  0,  2, -5,  0,  0,  0,  0,  0, -1 },
22008           {  0,  0,  0,  0,  0,  0,  1, -2,  0,  0,  0,  0,  0, -1 },
22009           {  0,  0,  0,  0,  0,  0,  0,  7, -9,  0,  0,  0,  0,  2 },
22010           {  0,  0,  0,  0,  0,  0,  0,  7, -8,  0,  0,  0,  0,  2 },
22011 
22012        /* 481-490 */
22013           {  0,  0,  0,  0,  0,  0,  0,  3,  0,  0,  0,  0,  0,  2 },
22014           {  0,  0,  0,  0,  0,  0,  0,  3, -8,  3,  0,  0,  0, -2 },
22015           {  0,  0,  0,  0,  0,  0,  0,  2,  0,  0, -2,  0,  0,  1 },
22016           {  0,  0,  0,  0,  0,  0,  0,  2, -4,  0,  0,  0,  0,  1 },
22017           {  0,  0,  0,  0,  0,  0,  0,  1,  0,  0,  0,  0,  0, -1 },
22018           {  0,  0,  0,  0,  0,  0,  0,  1,  0, -1,  0,  0,  0, -1 },
22019           {  2,  0,  0, -2, -1,  0,  0, -6,  8,  0,  0,  0,  0,  0 },
22020           {  2,  0, -1, -1,  1,  0,  0,  3, -7,  0,  0,  0,  0,  0 },
22021           {  0,  0,  2, -2,  1,  0,  0, -7,  9,  0,  0,  0,  0,  0 },
22022           {  0,  0,  0,  0,  0,  0,  0,  3, -5,  0,  0,  0,  0, -1 },
22023 
22024        /* 491-500 */
22025           {  0,  0,  1, -1,  2,  0, -8, 12,  0,  0,  0,  0,  0,  0 },
22026           {  1,  0,  0,  0,  0,  0,  0, -2,  0,  2,  0,  0,  0,  0 },
22027           {  1,  0,  0, -2,  0,  0,  2, -2,  0,  0,  0,  0,  0,  0 },
22028           {  0,  0,  0,  0,  0,  0,  7, -8,  0,  0,  0,  0,  0,  0 },
22029           {  0,  0,  0,  0,  0,  0,  0,  0,  2,  0,  0,  0,  0,  0 },
22030           {  2,  0,  0, -2,  1,  0,  0, -5,  6,  0,  0,  0,  0,  0 },
22031           {  2,  0,  0, -2, -1,  0,  0, -2,  0,  3, -1,  0,  0,  0 },
22032           {  1,  0,  1,  1,  1,  0,  0,  1,  0,  0,  0,  0,  0,  0 },
22033           {  1,  0,  0, -2,  1,  0,  0, -2,  0,  2,  0,  0,  0,  0 },
22034           {  1,  0,  0, -2, -1,  0,  0, -2,  0,  2,  0,  0,  0,  0 },
22035 
22036        /* 501-510 */
22037           {  1,  0,  0, -1, -1,  0,  0, -3,  4,  0,  0,  0,  0,  0 },
22038           {  1,  0, -1,  0, -1,  0, -3,  5,  0,  0,  0,  0,  0,  0 },
22039           {  0,  0,  2, -2,  1,  0,  0, -4,  4,  0,  0,  0,  0,  0 },
22040           {  0,  0,  2, -2,  1,  0,  0, -2,  0,  0,  0,  0,  0,  0 },
22041           {  0,  0,  2, -2,  1,  0, -8, 11,  0,  0,  0,  0,  0,  0 },
22042           {  0,  0,  2, -2,  0,  0,  0, -9, 13,  0,  0,  0,  0,  0 },
22043           {  0,  0,  1,  1,  2,  0,  0,  1,  0,  0,  0,  0,  0,  0 },
22044           {  0,  0,  1, -1,  1,  0,  0,  1, -4,  0,  0,  0,  0,  0 },
22045           {  0,  0,  1, -1,  1,  0,  0, -1,  0,  1, -3,  0,  0,  0 },
22046           {  0,  0,  0,  0,  1,  0,  0,  7,-13,  0,  0,  0,  0,  0 },
22047 
22048        /* 511-520 */
22049           {  0,  0,  0,  0,  1,  0,  0,  2,  0, -2,  0,  0,  0,  0 },
22050           {  0,  0,  0,  0,  1,  0,  0, -2,  2,  0,  0,  0,  0,  0 },
22051           {  0,  0,  0,  0,  1,  0, -3,  4,  0,  0,  0,  0,  0,  0 },
22052           {  0,  0,  0,  0,  0,  1,  0, -4,  0,  0,  0,  0,  0,  0 },
22053           {  0,  0,  0,  0,  0,  0,  7,-11,  0,  0,  0,  0,  0, -1 },
22054           {  0,  0,  0,  0,  0,  0,  6, -6,  0,  0,  0,  0,  0,  1 },
22055           {  0,  0,  0,  0,  0,  0,  6, -4,  0,  0,  0,  0,  0,  1 },
22056           {  0,  0,  0,  0,  0,  0,  5, -6,  0,  0,  0,  0,  0, -1 },
22057           {  0,  0,  0,  0,  0,  0,  4, -2,  0,  0,  0,  0,  0,  0 },
22058           {  0,  0,  0,  0,  0,  0,  3, -4,  0,  0,  0,  0,  0,  1 },
22059 
22060        /* 521-530 */
22061           {  0,  0,  0,  0,  0,  0,  1, -4,  0,  0,  0,  0,  0, -1 },
22062           {  0,  0,  0,  0,  0,  0,  0,  9,-17,  0,  0,  0,  0, -2 },
22063           {  0,  0,  0,  0,  0,  0,  0,  7, -7,  0,  0,  0,  0,  2 },
22064           {  0,  0,  0,  0,  0,  0,  0,  4, -8,  3,  0,  0,  0,  1 },
22065           {  0,  0,  0,  0,  0,  0,  0,  4, -8,  3,  0,  0,  0, -1 },
22066           {  0,  0,  0,  0,  0,  0,  0,  4, -8,  0,  0,  0,  0,  0 },
22067           {  0,  0,  0,  0,  0,  0,  0,  4, -7,  0,  0,  0,  0, -1 },
22068           {  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  0,  0,  1 },
22069           {  0,  0,  0,  0,  0,  0,  0,  1,  0, -4,  0,  0,  0,  0 },
22070           {  2,  0,  0, -2,  0,  0,  0, -4,  8, -3,  0,  0,  0,  0 },
22071 
22072        /* 531-540 */
22073           {  2,  0,  0, -2,  0,  0, -2,  2,  0,  0,  0,  0,  0,  0 },
22074           {  1,  0,  0,  0,  0,  0,  0,  4, -8,  3,  0,  0,  0,  0 },
22075           {  1,  0,  0,  0,  0,  0,  0, -4,  8, -3,  0,  0,  0,  0 },
22076           {  1,  0,  0,  0,  0,  0, -1,  1,  0,  0,  0,  0,  0,  0 },
22077           {  1,  0,  0, -2,  0,  0, 17,-16,  0, -2,  0,  0,  0,  0 },
22078           {  1,  0,  0, -1,  0,  0,  0, -2,  2,  0,  0,  0,  0,  0 },
22079           {  0,  0,  2, -2,  0,  0,  0, -2,  0,  2,  0,  0,  0,  0 },
22080           {  0,  0,  0,  0,  0,  0,  0,  6, -9,  0,  0,  0,  0,  0 },
22081           {  0,  0,  0,  0,  0,  0,  0,  4,  0,  0,  0,  0,  0,  0 },
22082           {  0,  0,  0,  0,  0,  0,  0,  3,  0, -4,  0,  0,  0,  0 },
22083 
22084        /* 541-550 */
22085           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1, -2, -2 },
22086           {  0,  0,  0,  0,  0,  0,  0,  2,  1,  0,  0,  0,  0,  2 },
22087           {  2,  0,  0, -2,  0,  0,  0, -4,  4,  0,  0,  0,  0,  0 },
22088           {  2,  0,  0, -2,  0,  0,  0, -2,  0,  2,  2,  0,  0,  0 },
22089           {  1,  0,  0,  0,  0,  0,  1, -1,  0,  0,  0,  0,  0,  0 },
22090           {  1,  0,  0,  0,  0,  0,  0, -1,  0,  1,  0,  0,  0,  0 },
22091           {  1,  0,  0,  0,  0,  0, -3,  3,  0,  0,  0,  0,  0,  0 },
22092           {  1,  0,  0, -2,  0,  0,  1, -1,  0,  0,  0,  0,  0,  0 },
22093           {  1,  0,  0, -2,  0,  0,  0,  4, -8,  3,  0,  0,  0,  0 },
22094           {  1,  0,  0, -2,  0,  0,  0, -4,  8, -3,  0,  0,  0,  0 },
22095 
22096        /* 551-560 */
22097           {  1,  0,  0, -2,  0,  0, -2,  2,  0,  0,  0,  0,  0,  0 },
22098           {  0,  0,  2, -2,  0,  0, -4,  4,  0,  0,  0,  0,  0,  0 },
22099           {  0,  0,  1,  1,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0 },
22100           {  0,  0,  1, -1,  0,  0,  3, -6,  0,  0,  0,  0,  0,  0 },
22101           {  0,  0,  1, -1,  0,  0,  0, -2,  2,  0,  0,  0,  0,  0 },
22102           {  0,  0,  1, -1,  0,  0,  0, -1,  0,  1,  0,  0,  0,  0 },
22103           {  0,  0,  1, -1,  0,  0,  0, -1,  0,  0,  1,  0,  0,  0 },
22104           {  0,  0,  1, -1,  0,  0, -4,  5,  0,  0,  0,  0,  0,  0 },
22105           {  0,  0,  1, -1,  0,  0, -3,  4,  0,  0,  0,  0,  0,  0 },
22106           {  0,  0,  0,  2,  0,  0,  0, -1,  0,  1,  0,  0,  0,  0 },
22107 
22108        /* 561-570 */
22109           {  0,  0,  0,  0,  0,  0,  8, -9,  0,  0,  0,  0,  0,  0 },
22110           {  0,  0,  0,  0,  0,  0,  3, -6,  0,  0,  0,  0,  0,  0 },
22111           {  0,  0,  0,  0,  0,  0,  1,  1,  0,  0,  0,  0,  0,  0 },
22112           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  3, -5,  0,  0,  0 },
22113           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  2, -2,  0,  0,  0 },
22114           {  2,  0, -2, -2, -2,  0,  0, -2,  0,  2,  0,  0,  0,  0 },
22115           {  1,  0,  0,  0,  1,  0,-10,  3,  0,  0,  0,  0,  0,  0 },
22116           {  1,  0,  0,  0, -1,  0,-10,  3,  0,  0,  0,  0,  0,  0 },
22117           {  0,  0,  2,  0,  2,  0,  2, -3,  0,  0,  0,  0,  0,  0 },
22118           {  0,  0,  2,  0,  2,  0,  2, -2,  0,  0,  0,  0,  0,  0 },
22119 
22120        /* 571-580 */
22121           {  0,  0,  2,  0,  2,  0, -2,  3,  0,  0,  0,  0,  0,  0 },
22122           {  0,  0,  2,  0,  2,  0, -2,  2,  0,  0,  0,  0,  0,  0 },
22123           {  0,  0,  0,  0,  2,  0,  0,  0,  0,  1,  0,  0,  0,  0 },
22124           {  0,  0,  0,  0,  1,  0,  0, -1,  0,  2,  0,  0,  0,  0 },
22125           {  2,  0,  2, -2,  2,  0,  0, -2,  0,  3,  0,  0,  0,  0 },
22126           {  2,  0,  1, -3,  1,  0, -6,  7,  0,  0,  0,  0,  0,  0 },
22127           {  2,  0,  0, -2,  0,  0,  2, -5,  0,  0,  0,  0,  0,  0 },
22128           {  2,  0,  0, -2,  0,  0,  0, -2,  0,  5, -5,  0,  0,  0 },
22129           {  2,  0,  0, -2,  0,  0,  0, -2,  0,  1,  5,  0,  0,  0 },
22130           {  2,  0,  0, -2,  0,  0,  0, -2,  0,  0,  5,  0,  0,  0 },
22131 
22132        /* 581-590 */
22133           {  2,  0,  0, -2,  0,  0,  0, -2,  0,  0,  2,  0,  0,  0 },
22134           {  2,  0,  0, -2,  0,  0, -4,  4,  0,  0,  0,  0,  0,  0 },
22135           {  2,  0, -2,  0, -2,  0,  0,  5, -9,  0,  0,  0,  0,  0 },
22136           {  2,  0, -1, -1,  0,  0,  0, -1,  0,  3,  0,  0,  0,  0 },
22137           {  1,  0,  2,  0,  2,  0,  1, -1,  0,  0,  0,  0,  0,  0 },
22138           {  1,  0,  2,  0,  2,  0,  0,  4, -8,  3,  0,  0,  0,  0 },
22139           {  1,  0,  2,  0,  2,  0,  0, -4,  8, -3,  0,  0,  0,  0 },
22140           {  1,  0,  2,  0,  2,  0, -1,  1,  0,  0,  0,  0,  0,  0 },
22141           {  1,  0,  2, -2,  2,  0, -3,  3,  0,  0,  0,  0,  0,  0 },
22142           {  1,  0,  0,  0,  0,  0,  0,  1,  0, -1,  0,  0,  0,  0 },
22143 
22144        /* 591-600 */
22145           {  1,  0,  0,  0,  0,  0,  0, -2,  0,  3,  0,  0,  0,  0 },
22146           {  1,  0,  0, -2,  0,  0,  0,  2,  0, -2,  0,  0,  0,  0 },
22147           {  1,  0, -2, -2, -2,  0,  0,  1,  0, -1,  0,  0,  0,  0 },
22148           {  1,  0, -1,  1,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0 },
22149           {  1,  0, -1, -1,  0,  0,  0,  8,-15,  0,  0,  0,  0,  0 },
22150           {  0,  0,  2,  2,  2,  0,  0,  2,  0, -2,  0,  0,  0,  0 },
22151           {  0,  0,  2, -2,  1,  0,  1, -1,  0,  0,  0,  0,  0,  0 },
22152           {  0,  0,  2, -2,  1,  0,  0, -2,  0,  1,  0,  0,  0,  0 },
22153           {  0,  0,  2, -2,  1,  0,  0,-10, 15,  0,  0,  0,  0,  0 },
22154           {  0,  0,  2, -2,  0, -1,  0,  2,  0,  0,  0,  0,  0,  0 },
22155 
22156        /* 601-610 */
22157           {  0,  0,  1, -1,  2,  0,  0, -1,  0,  0, -1,  0,  0,  0 },
22158           {  0,  0,  1, -1,  2,  0, -3,  4,  0,  0,  0,  0,  0,  0 },
22159           {  0,  0,  1, -1,  1,  0, -4,  6,  0,  0,  0,  0,  0,  0 },
22160           {  0,  0,  1, -1,  1,  0, -1,  2,  0,  0,  0,  0,  0,  0 },
22161           {  0,  0,  1, -1,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0 },
22162           {  0,  0,  1, -1,  0,  0,  0, -1,  0,  0, -2,  0,  0,  0 },
22163           {  0,  0,  1, -1,  0,  0, -2,  2,  0,  0,  0,  0,  0,  0 },
22164           {  0,  0,  1, -1,  0,  0, -1,  0,  0,  0,  0,  0,  0,  0 },
22165           {  0,  0,  1, -1, -1,  0, -5,  7,  0,  0,  0,  0,  0,  0 },
22166           {  0,  0,  0,  2,  0,  0,  0,  2,  0, -2,  0,  0,  0,  0 },
22167 
22168        /* 611-620 */
22169           {  0,  0,  0,  2,  0,  0, -2,  2,  0,  0,  0,  0,  0,  0 },
22170           {  0,  0,  0,  0,  2,  0, -3,  5,  0,  0,  0,  0,  0,  0 },
22171           {  0,  0,  0,  0,  1,  0, -1,  2,  0,  0,  0,  0,  0,  0 },
22172           {  0,  0,  0,  0,  0,  0,  9,-13,  0,  0,  0,  0,  0, -2 },
22173           {  0,  0,  0,  0,  0,  0,  8,-14,  0,  0,  0,  0,  0, -2 },
22174           {  0,  0,  0,  0,  0,  0,  8,-11,  0,  0,  0,  0,  0, -1 },
22175           {  0,  0,  0,  0,  0,  0,  6, -9,  0,  0,  0,  0,  0,  0 },
22176           {  0,  0,  0,  0,  0,  0,  6, -8,  0,  0,  0,  0,  0,  0 },
22177           {  0,  0,  0,  0,  0,  0,  6, -7,  0,  0,  0,  0,  0, -1 },
22178           {  0,  0,  0,  0,  0,  0,  5, -6,  0,  0,  0,  0,  0, -2 },
22179 
22180        /* 621-630 */
22181           {  0,  0,  0,  0,  0,  0,  5, -6, -4,  0,  0,  0,  0, -2 },
22182           {  0,  0,  0,  0,  0,  0,  5, -4,  0,  0,  0,  0,  0,  2 },
22183           {  0,  0,  0,  0,  0,  0,  4, -8,  0,  0,  0,  0,  0, -2 },
22184           {  0,  0,  0,  0,  0,  0,  4, -5,  0,  0,  0,  0,  0,  0 },
22185           {  0,  0,  0,  0,  0,  0,  3, -3,  0,  2,  0,  0,  0,  2 },
22186           {  0,  0,  0,  0,  0,  0,  3, -1,  0,  0,  0,  0,  0,  0 },
22187           {  0,  0,  0,  0,  0,  0,  2,  0,  0,  0,  0,  0,  0,  0 },
22188           {  0,  0,  0,  0,  0,  0,  1, -1,  0,  0,  0,  0,  0, -2 },
22189           {  0,  0,  0,  0,  0,  0,  0,  7,-12,  0,  0,  0,  0, -2 },
22190           {  0,  0,  0,  0,  0,  0,  0,  6, -9,  0,  0,  0,  0, -2 },
22191 
22192        /* 631-640 */
22193           {  0,  0,  0,  0,  0,  0,  0,  6, -8,  1,  5,  0,  0,  2 },
22194           {  0,  0,  0,  0,  0,  0,  0,  6, -4,  0,  0,  0,  0,  2 },
22195           {  0,  0,  0,  0,  0,  0,  0,  6,-10,  0,  0,  0,  0,  0 },
22196           {  0,  0,  0,  0,  0,  0,  0,  5,  0, -4,  0,  0,  0,  2 },
22197           {  0,  0,  0,  0,  0,  0,  0,  5, -9,  0,  0,  0,  0, -1 },
22198           {  0,  0,  0,  0,  0,  0,  0,  5, -8,  3,  0,  0,  0,  2 },
22199           {  0,  0,  0,  0,  0,  0,  0,  5, -7,  0,  0,  0,  0, -2 },
22200           {  0,  0,  0,  0,  0,  0,  0,  5, -6,  0,  0,  0,  0,  0 },
22201           {  0,  0,  0,  0,  0,  0,  0,  5,-16,  4,  5,  0,  0, -2 },
22202           {  0,  0,  0,  0,  0,  0,  0,  5,-13,  0,  0,  0,  0, -2 },
22203 
22204        /* 641-650 */
22205           {  0,  0,  0,  0,  0,  0,  0,  3,  0, -5,  0,  0,  0, -2 },
22206           {  0,  0,  0,  0,  0,  0,  0,  3, -9,  0,  0,  0,  0, -2 },
22207           {  0,  0,  0,  0,  0,  0,  0,  3, -7,  0,  0,  0,  0, -2 },
22208           {  0,  0,  0,  0,  0,  0,  0,  2,  0,  2,  0,  0,  0,  2 },
22209           {  0,  0,  0,  0,  0,  0,  0,  2,  0,  0, -3,  0,  0,  0 },
22210           {  0,  0,  0,  0,  0,  0,  0,  2, -8,  1,  5,  0,  0, -2 },
22211           {  0,  0,  0,  0,  0,  0,  0,  1,  0,  1, -5,  0,  0,  0 },
22212           {  0,  0,  0,  0,  0,  0,  0,  1,  0,  0,  2,  0,  0,  2 },
22213           {  0,  0,  0,  0,  0,  0,  0,  1,  0,  0, -3,  0,  0,  0 },
22214           {  0,  0,  0,  0,  0,  0,  0,  1,  0, -3,  5,  0,  0,  0 },
22215 
22216        /* 651-NFPL */
22217           {  0,  0,  0,  0,  0,  0,  0,  1, -3,  0,  0,  0,  0,  0 },
22218           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  2, -6,  3,  0, -2 },
22219           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  1, -2,  0,  0,  0 },
22220           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  0 },
22221           {  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  2 },
22222           {  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  0,  0,  0,  0 }
22223        };
22224 
22225       /**
22226        *
22227        *  Time scale transformation:  Terrestrial Time, TT, to International
22228        *  Atomic Time, TAI.
22229        *
22230        * <p>This function is derived from the International Astronomical Union's
22231        *  SOFA (Standards of Fundamental Astronomy) software collection.
22232        *
22233        *<p>Status:  canonical.
22234        *
22235        *<!-- Given: -->
22236        *     tt1,tt2    double    TT as a 2-part Julian Date
22237        *
22238        *<!-- Returned:-->
22239        *     tai1,tai2  double    TAI as a 2-part Julian Date
22240        *
22241        *  Returned (function value):
22242        *                int       status:  0 = OK
22243        *
22244        *  Note:
22245        *
22246        *     tt1+tt2 is Julian Date, apportioned in any convenient way between
22247        *     the two arguments, for example where tt1 is the Julian Day Number
22248        *     and tt2 is the fraction of a day.  The returned tai1,tai2 follow
22249        *     suit.
22250        *
22251        *<p>References:
22252        *
22253        *     McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
22254        *     IERS Technical Note No. 32, BKG (2004)
22255        *
22256        *     Explanatory Supplement to the Astronomical Almanac,
22257        *     P. Kenneth Seidelmann (ed), University Science Books (1992)
22258        *
22259        *@version 2010 May 13
22260        *
22261        *@since SOFA release 2010-12-01
22262        *
22263        *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
22264        */
22265       public static JulianDate jauTttai(double tt1, double tt2)
22266       {
22267           double tai1, tai2;
22268           /* TT minus TAI (days). */
22269           final double dtat = TTMTAI / 86400.0;
22270 
22271 
22272           /* Result, safeguarding precision. */
22273           if ( tt1 > tt2 ) {
22274               tai1 = tt1;
22275               tai2 = tt2 - dtat;
22276           } else {
22277               tai1 = tt1 - dtat;
22278               tai2 = tt2;
22279           }
22280 
22281           return new JulianDate(tai1, tai2);
22282 
22283       };
22284 
22285       /**
22286        *
22287        *  Time scale transformation:  Terrestrial Time, TT, to Geocentric
22288        *  Coordinate Time, TCG.
22289        *
22290        * <p>This function is derived from the International Astronomical Union's
22291        *  SOFA (Standards of Fundamental Astronomy) software collection.
22292        *
22293        *<p>Status:  canonical.
22294        *
22295        *<!-- Given: -->
22296        *     tt1,tt2    double    TT as a 2-part Julian Date
22297        *
22298        *<!-- Returned:-->
22299        *     tcg1,tcg2  double    TCG as a 2-part Julian Date
22300        *
22301        *  Returned (function value):
22302        *                int       status:  0 = OK
22303        *
22304        *  Note:
22305        *
22306        *     tt1+tt2 is Julian Date, apportioned in any convenient way between
22307        *     the two arguments, for example where tt1 is the Julian Day Number
22308        *     and tt2 is the fraction of a day.  The returned tcg1,tcg2 follow
22309        *     suit.
22310        *
22311        *<p>References:
22312        *
22313        *     McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
22314        *     IERS Technical Note No. 32, BKG (2004)
22315        *
22316        *     IAU 2000 Resolution B1.9
22317        *
22318        *@version 2010 May 13
22319        *
22320        *@since SOFA release 2010-12-01
22321        *
22322        *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
22323        */
22324       public static JulianDate jauTttcg(double tt1, double tt2)
22325 
22326       {
22327           double tcg1, tcg2;
22328 
22329           /* 1977 Jan 1 00:00:32.184 TT, as MJD */
22330           final double t77t = DJM77 + TTMTAI/DAYSEC;
22331 
22332           /* TT to TCG rate */
22333           final double elgg = ELG/(1.0-ELG);
22334 
22335 
22336           /* Result, safeguarding precision. */
22337           if ( tt1 > tt2 ) {
22338               tcg1 = tt1;
22339               tcg2 = tt2 + ( ( tt1 - DJM0 ) + ( tt2 - t77t ) ) * elgg;
22340           } else {
22341               tcg1 = tt1 + ( ( tt2 - DJM0 ) + ( tt1 - t77t ) ) * elgg;
22342               tcg2 = tt2;
22343           }
22344 
22345           return new JulianDate(tcg1, tcg2);
22346 
22347       };      
22348 
22349       /**
22350        *
22351        *  Time scale transformation:  Terrestrial Time, TT, to Barycentric
22352        *  Dynamical Time, TDB.
22353        *
22354        * <p>This function is derived from the International Astronomical Union's
22355        *  SOFA (Standards of Fundamental Astronomy) software collection.
22356        *
22357        *<p>Status:  canonical.
22358        *
22359        *<!-- Given: -->
22360        *     tt1,tt2    double    TT as a 2-part Julian Date
22361        *     dtr        double    TDB-TT in seconds
22362        *
22363        *<!-- Returned:-->
22364        *     tdb1,tdb2  double    TDB as a 2-part Julian Date
22365        *
22366        *  Returned (function value):
22367        *                int       status:  0 = OK
22368        *
22369        *<p>Notes:
22370        *
22371        *  1  tt1+tt2 is Julian Date, apportioned in any convenient way between
22372        *     the two arguments, for example where tt1 is the Julian Day Number
22373        *     and tt2 is the fraction of a day.  The returned tdb1,tdb2 follow
22374        *     suit.
22375        *
22376        *  2  The argument dtr represents the quasi-periodic component of the
22377        *     GR transformation between TT and TCB.  It is dependent upon the
22378        *     adopted solar-system ephemeris, and can be obtained by numerical
22379        *     integration, by interrogating a precomputed time ephemeris or by
22380        *     evaluating a model such as that implemented in the SOFA function
22381        *     jauDtdb.   The quantity is dominated by an annual term of 1.7 ms
22382        *     amplitude.
22383        *
22384        *  3  TDB is essentially the same as Teph, the time argument for the JPL
22385        *     solar system ephemerides.
22386        *
22387        *<p>References:
22388        *
22389        *     McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
22390        *     IERS Technical Note No. 32, BKG (2004)
22391        *
22392        *     IAU 2006 Resolution 3
22393        *
22394        *@version 2010 May 13
22395        *
22396        *@since SOFA release 2010-12-01
22397        *
22398        *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
22399        */
22400       public static JulianDate jauTttdb(double tt1, double tt2, double dtr)
22401       {
22402 
22403           double tdb1, tdb2;
22404           double dtrd;
22405 
22406 
22407           /* Result, safeguarding precision. */
22408           dtrd = dtr / DAYSEC;
22409           if ( tt1 > tt2 ) {
22410               tdb1 = tt1;
22411               tdb2 = tt2 + dtrd;
22412           } else {
22413               tdb1 = tt1 + dtrd;
22414               tdb2 = tt2;
22415           }
22416 
22417           return new JulianDate(tdb1, tdb2);
22418 
22419       };
22420 
22421       /**
22422        *
22423        *  Time scale transformation:  Terrestrial Time, TT, to Universal Time,
22424        *  UT1.
22425        *
22426        * <p>This function is derived from the International Astronomical Union's
22427        *  SOFA (Standards of Fundamental Astronomy) software collection.
22428        *
22429        *<p>Status:  canonical.
22430        *
22431        *<!-- Given: -->
22432        *     tt1,tt2    double    TT as a 2-part Julian Date
22433        *     dt         double    TT-UT1 in seconds
22434        *
22435        *<!-- Returned:-->
22436        *     ut11,ut12  double    UT1 as a 2-part Julian Date
22437        *
22438        *  Returned (function value):
22439        *                int       status:  0 = OK
22440        *
22441        *<p>Notes:
22442        *
22443        *  1  tt1+tt2 is Julian Date, apportioned in any convenient way between
22444        *     the two arguments, for example where tt1 is the Julian Day Number
22445        *     and tt2 is the fraction of a day.  The returned ut11,ut12 follow
22446        *     suit.
22447        *
22448        *  2  The argument dt is classical Delta T.
22449        *
22450        *  Reference:
22451        *
22452        *     Explanatory Supplement to the Astronomical Almanac,
22453        *     P. Kenneth Seidelmann (ed), University Science Books (1992)
22454        *
22455        *@version 2010 May 16
22456        *
22457        *@since SOFA release 2010-12-01
22458        *
22459        *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
22460        */
22461       public static JulianDate jauTtut1(double tt1, double tt2, double dt)
22462 
22463       {
22464 
22465           double ut11, ut12;
22466           double dtd;
22467 
22468 
22469           /* Result, safeguarding precision. */
22470           dtd = dt / DAYSEC;
22471           if ( tt1 > tt2 ) {
22472               ut11 = tt1;
22473               ut12 = tt2 - dtd;
22474           } else {
22475               ut11 = tt1 - dtd;
22476               ut12 = tt2;
22477           }
22478 
22479           return new JulianDate(ut11, ut12);
22480       };
22481 
22482       /**
22483        *
22484        *  Time scale transformation:  Universal Time, UT1, to International
22485        *  Atomic Time, TAI.
22486        *
22487        * <p>This function is derived from the International Astronomical Union's
22488        *  SOFA (Standards of Fundamental Astronomy) software collection.
22489        *
22490        *<p>Status:  canonical.
22491        *
22492        *<!-- Given: -->
22493        *     ut11,ut12  double    UT1 as a 2-part Julian Date
22494        *     dta        double    UT1-TAI in seconds
22495        *
22496        *<!-- Returned:-->
22497        *     tai1,tai2  double    TAI as a 2-part Julian Date
22498        *
22499        *  Returned (function value):
22500        *                int       status:  0 = OK
22501        *
22502        *<p>Notes:
22503        *
22504        *  1  ut11+ut12 is Julian Date, apportioned in any convenient way
22505        *     between the two arguments, for example where ut11 is the Julian
22506        *     Day Number and ut12 is the fraction of a day.  The returned
22507        *     TAI1,TAI2 follow suit.
22508        *
22509        *  2  The argument dta, i.e. UT1-TAI, is an observed quantity, and is
22510        *     available from IERS tabulations.
22511        *
22512        *  Reference:
22513        *
22514        *     Explanatory Supplement to the Astronomical Almanac,
22515        *     P. Kenneth Seidelmann (ed), University Science Books (1992)
22516        *
22517        *@version 2010 May 16
22518        *
22519        *@since SOFA release 2010-12-01
22520        *
22521        *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
22522        */
22523       public static JulianDate jauUt1tai(double ut11, double ut12, double dta )
22524 
22525       {
22526           double tai1, tai2;
22527           double dtad;
22528 
22529 
22530           /* Result, safeguarding precision. */
22531           dtad = dta / DAYSEC;
22532           if ( ut11 > ut12 ) {
22533               tai1 = ut11;
22534               tai2 = ut12 - dtad;
22535           } else {
22536               tai1 = ut11 - dtad;
22537               tai2 = ut12;
22538           }
22539           return new JulianDate(tai1, tai2);
22540 
22541       };
22542 
22543       /**
22544        *
22545        *  Time scale transformation:  Universal Time, UT1, to Terrestrial
22546        *  Time, TT.
22547        *
22548        * <p>This function is derived from the International Astronomical Union's
22549        *  SOFA (Standards of Fundamental Astronomy) software collection.
22550        *
22551        *<p>Status:  canonical.
22552        *
22553        *<!-- Given: -->
22554        *     ut11,ut12  double    UT1 as a 2-part Julian Date
22555        *     dt         double    TT-UT1 in seconds
22556        *
22557        *<!-- Returned:-->
22558        *     tt1,tt2    double    TAI as a 2-part Julian Date
22559        *
22560        *  Returned (function value):
22561        *                int       status:  0 = OK
22562        *
22563        *<p>Notes:
22564        *
22565        *  1  ut11+ut12 is Julian Date, apportioned in any convenient way
22566        *     between the two arguments, for example where ut11 is the Julian
22567        *     Day Number and ut12 is the fraction of a day.  The returned
22568        *     tt1,tt2 follow suit.
22569        *
22570        *  2  The argument dt is classical Delta T.
22571        *
22572        *  Reference:
22573        *
22574        *     Explanatory Supplement to the Astronomical Almanac,
22575        *     P. Kenneth Seidelmann (ed), University Science Books (1992)
22576        *
22577        *@version 2010 May 16
22578        *
22579        *@since SOFA release 2010-12-01
22580        *
22581        *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
22582        */
22583       public static JulianDate jauUt1tt(double ut11, double ut12, double dt)
22584       {
22585 
22586           double tt1, tt2;
22587           double dtd;
22588 
22589 
22590           /* Result, safeguarding precision. */
22591           dtd = dt / DAYSEC;
22592           if ( ut11 > ut12 ) {
22593               tt1 = ut11;
22594               tt2 = ut12 + dtd;
22595           } else {
22596               tt1 = ut11 + dtd;
22597               tt2 = ut12;
22598           }
22599 
22600           return new JulianDate(tt1, tt2);
22601 
22602       };
22603 
22604       /**
22605        *
22606        *  Time scale transformation:  Universal Time, UT1, to Coordinated
22607        *  Universal Time, UTC.
22608        *
22609        * <p>This function is derived from the International Astronomical Union's
22610        *  SOFA (Standards of Fundamental Astronomy) software collection.
22611        *
22612        *<p>Status:  canonical.
22613        *
22614        *<!-- Given: -->
22615        *     @param ut11 double   UT1 as a 2-part Julian Date (Note 1)
22616        *     @param ut12 double   UT1 as a 2-part Julian Date (Note 1) 
22617        *     dut1       double   Delta UT1: UT1-UTC in seconds (Note 2)
22618        *
22619        *<!-- Returned:-->
22620        *     @return  JulianDate   UTC as a 2-part quasi Julian Date (Notes 3,4)
22621        *
22622        *  Returned (function value):
22623        *                int      status: +1 = dubious year (Note 5)
22624        *                                  0 = OK
22625        *                                 -1 = unacceptable date
22626        *
22627        *<p>Notes:
22628        *<ol>
22629        *  <li>  ut11+ut12 is Julian Date, apportioned in any convenient way
22630        *     between the two arguments, for example where ut11 is the Julian
22631        *     Day Number and ut12 is the fraction of a day.  The returned utc1
22632        *     and utc2 form an analogous pair, except that a special convention
22633        *     is used, to deal with the problem of leap seconds - see Note 3.
22634        *
22635        *  <li> Delta UT1 can be obtained from tabulations provided by the
22636        *     International Earth Rotation and Reference Systems Service.  The
22637        *     value changes abruptly by 1s at a leap second;  however, close to
22638        *     a leap second the algorithm used here is tolerant of the "wrong"
22639        *     choice of value being made.
22640        *
22641        *  <li> JD cannot unambiguously represent UTC during a leap second unless
22642        *     special measures are taken.  The convention in the present
22643        *     function is that the returned quasi JD day UTC1+UTC2 represents
22644        *     UTC days whether the length is 86399, 86400 or 86401 SI seconds.
22645        *
22646        *  <li> The function jauD2dtf can be used to transform the UTC quasi-JD
22647        *     into calendar date and clock time, including UTC leap second
22648        *     handling.
22649        *
22650        *  <li> The warning status "dubious year" flags UTCs that predate the
22651        *     introduction of the time scale and that are too far in the future
22652        *     to be trusted.  See jauDat for further details.
22653        *</ol>
22654        *  Called:
22655        *  <ul>
22656        *     <li>{@link #jauJd2cal}    JD to Gregorian calendar
22657        *     <li>{@link #jauDat}       delta(AT) = TAI-UTC
22658        *     <li>{@link #jauCal2jd}    Gregorian calendar to JD
22659        *</ul>
22660        *<p>References:
22661        *
22662        *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
22663        *     IERS Technical Note No. 32, BKG (2004)
22664        *
22665        *     <p>Explanatory Supplement to the Astronomical Almanac,
22666        *     P. Kenneth Seidelmann (ed), University Science Books (1992)
22667        *
22668        *@version 2010 May 16
22669        *
22670        *@since SOFA release 2010-12-01
22671        *
22672        *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
22673        * @throws JSOFAIllegalParameter 
22674        * @throws JSOFAInternalError 
22675        */
22676       public static JulianDate jauUt1utc(double ut11, double ut12, double dut1) throws JSOFAIllegalParameter, JSOFAInternalError
22677 
22678       {
22679 
22680           double utc1, utc2;
22681           boolean big1;
22682           int i;
22683           double duts, u1, u2, d1, dats1, d2, fd, dats2, ddats, us1, us2, du;
22684 
22685 
22686           /* UT1-UTC in seconds. */
22687           duts = dut1;
22688 
22689           /* Put the two parts of the UT1 into big-first order. */
22690           big1 = ( ut11 >= ut12 );
22691           if ( big1 ) {
22692               u1 = ut11;
22693               u2 = ut12;
22694           } else {
22695               u1 = ut12;
22696               u2 = ut11;
22697           }
22698 
22699           /* See if the UT1 can possibly be in a leap-second day. */
22700           d1 = u1;
22701           dats1 = 0;
22702           for ( i = -1; i <= 3; i++ ) {
22703               d2 = u2 + (double) i;
22704               Calendar dt = jauJd2cal(d1, d2 );
22705               dats2 = jauDat(dt.iy, dt.im, dt.id, 0.0);
22706               if ( i == - 1 ) dats1 = dats2;
22707               ddats = dats2 - dats1;
22708               if ( abs(ddats) >= 0.5 ) {
22709 
22710                   /* Yes, leap second nearby: ensure UT1-UTC is "before" value. */
22711                   if ( ddats * duts >= 0 ) duts -= ddats;
22712 
22713                   /* UT1 for the start of the UTC day that ends in a leap. */
22714                   JulianDate jd = jauCal2jd(dt.iy, dt.im, dt.id );
22715                   d1 = jd.djm0; d2 = jd.djm1;
22716                   us1 = d1;
22717                   us2 = d2 - 1.0 + duts/DAYSEC;
22718 
22719                   /* Is the UT1 after this point? */
22720                   du = u1 - us1;
22721                   du += u2 - us2;
22722                   if ( du > 0 ) {
22723 
22724                       /* Yes:  fraction of the current UTC day that has elapsed. */
22725                       fd = du * DAYSEC / ( DAYSEC + ddats );
22726 
22727                       /* Ramp UT1-UTC to bring about SOFA's JD(UTC) convention. */
22728                       duts += ddats * ( fd <= 1.0 ? fd : 1.0 );
22729                   }
22730 
22731                   /* Done. */
22732                   break;
22733               }
22734               dats1 = dats2;
22735           }
22736 
22737           /* Subtract the (possibly adjusted) UT1-UTC from UT1 to give UTC. */
22738           u2 -= duts / DAYSEC;
22739 
22740           /* Result, safeguarding precision. */
22741           if ( big1 ) {
22742               utc1 = u1;
22743               utc2 = u2;
22744           } else {
22745               utc1 = u2;
22746               utc2 = u1;
22747           }
22748 
22749           /* FIXME Status. */
22750           return new JulianDate(utc1, utc2);
22751 
22752       };
22753 
22754       /**
22755        *
22756        *  Time scale transformation:  Coordinated Universal Time, UTC, to
22757        *  International Atomic Time, TAI.
22758        *
22759        * <p>This function is derived from the International Astronomical Union's
22760        *  SOFA (Standards of Fundamental Astronomy) software collection.
22761        *
22762        *<p>Status:  canonical.
22763        *
22764        *<!-- Given: -->
22765        *     @param utc1 double   UTC as a 2-part quasi Julian Date (Notes 1-4)
22766        *     @param utc2 double   UTC as a 2-part quasi Julian Date (Notes 1-4) 
22767        *
22768        *<!-- Returned:-->
22769        *     @return JulianDate     TAI as a 2-part Julian Date (Note 5)
22770        *
22771        *  Returned (function value):
22772        *                int      status: +1 = dubious year (Note 3)
22773        *                                  0 = OK
22774        *                                 -1 = unacceptable date
22775        *
22776        *<p>Notes:
22777        *<ol>
22778        *  <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
22779        *     convenient way between the two arguments, for example where utc1
22780        *     is the Julian Day Number and utc2 is the fraction of a day.
22781        *
22782        *  <li> JD cannot unambiguously represent UTC during a leap second unless
22783        *     special measures are taken.  The convention in the present
22784        *     function is that the JD day represents UTC days whether the
22785        *     length is 86399, 86400 or 86401 SI seconds.
22786        *
22787        *  <li> The warning status "dubious year" flags UTCs that predate the
22788        *     introduction of the time scale and that are too far in the future
22789        *     to be trusted.  See jauDat  for further details.
22790        *
22791        *  <li> The function jauDtf2d converts from calendar date and time of day
22792        *     into 2-part Julian Date, and in the case of UTC implements the
22793        *     leap-second-ambiguity convention described above.
22794        *
22795        *  <li> The returned TAI1,TAI2 are such that their sum is the TAI Julian
22796        *     Date.
22797        *</ol>
22798        *  Called:<ul>
22799        *     <li>{@link #jauJd2cal}    JD to Gregorian calendar
22800        *     <li>{@link #jauDat}       delta(AT) = TAI-UTC
22801        *     <li>{@link #jauCal2jd}    Gregorian calendar to JD
22802        *</ul>
22803        *<p>References:
22804        *
22805        *     McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
22806        *     IERS Technical Note No. 32, BKG (2004)
22807        *
22808        *     Explanatory Supplement to the Astronomical Almanac,
22809        *     P. Kenneth Seidelmann (ed), University Science Books (1992)
22810        *
22811        *@version 2010 September 10
22812        *
22813        *@since SOFA release 2010-12-01
22814        *
22815        *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
22816      * @throws JSOFAInternalError 
22817      * @throws JSOFAIllegalParameter 
22818        *
22819        */
22820       public static JulianDate jauUtctai(double utc1, double utc2) throws JSOFAIllegalParameter, JSOFAInternalError
22821 
22822       {
22823           double tai1, tai2;
22824           boolean big1;
22825           double u1, u2,  dats,  datst, ddat, a2, fd;
22826 
22827 
22828           /* Put the two parts of the UTC into big-first order. */
22829           big1 = ( utc1 >= utc2 );
22830           if ( big1 ) {
22831               u1 = utc1;
22832               u2 = utc2;
22833           } else {
22834               u1 = utc2;
22835               u2 = utc1;
22836           }
22837 
22838           /* Get TAI-UTC now. */
22839           Calendar dt = jauJd2cal(u1, u2 );
22840           dats = jauDat(dt.iy, dt.im, dt.id, dt.fd);
22841  //         if ( js < 0 ) return -1;
22842           fd = dt.fd;
22843           /* Get TAI-UTC tomorrow. */
22844           Calendar dtt = jauJd2cal(u1+1.5, u2-fd );
22845           datst = jauDat(dtt.iy, dtt.im, dtt.id, dtt.fd);
22846 //          if ( js < 0 ) return -1;
22847 
22848           /* If today ends in a leap second, scale the fraction into SI days. */
22849           ddat = datst - dats;
22850           if ( abs(ddat) > 0.5 ) fd += fd * ddat / DAYSEC;
22851 
22852           /* Today's calendar date to 2-part JD. */
22853           JulianDate jd = jauCal2jd(dt.iy, dt.im, dt.id ) ;
22854 
22855           /* Assemble the TAI result, preserving the UTC split and order. */
22856           a2 = jd.djm0 - u1;
22857           a2 += jd.djm1;
22858           a2 += fd + dats / DAYSEC;
22859           if ( big1 ) {
22860               tai1 = u1;
22861               tai2 = a2;
22862           } else {
22863               tai1 = a2;
22864               tai2 = u1;
22865           }
22866 
22867           /* FIXME Status. */
22868           return new JulianDate(tai1, tai2);
22869 
22870       };
22871 
22872       /**
22873        *
22874        *  Time scale transformation:  Coordinated Universal Time, UTC, to
22875        *  Universal Time, UT1.
22876        *
22877        * <p>This function is derived from the International Astronomical Union's
22878        *  SOFA (Standards of Fundamental Astronomy) software collection.
22879        *
22880        *<p>Status:  canonical.
22881        *
22882        *<!-- Given: -->
22883        *     utc1,utc2  double   UTC as a 2-part quasi Julian Date (Notes 1-4)
22884        *     dut1       double   Delta UT1 = UT1-UTC in seconds (Note 5)
22885        *
22886        *<!-- Returned:-->
22887        *     ut11,ut12  double   UT1 as a 2-part Julian Date (Note 6)
22888        *
22889        *  Returned (function value):
22890        *                int      status: +1 = dubious year (Note 7)
22891        *                                  0 = OK
22892        *                                 -1 = unacceptable date
22893        *
22894        *<p>Notes:
22895        *<ol>
22896        *  <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
22897        *     convenient way between the two arguments, for example where utc1
22898        *     is the Julian Day Number and utc2 is the fraction of a day.
22899        *
22900        *  <li> JD cannot unambiguously represent UTC during a leap second unless
22901        *     special measures are taken.  The convention in the present
22902        *     function is that the JD day represents UTC days whether the
22903        *     length is 86399, 86400 or 86401 SI seconds.
22904        *
22905        *  <li> The warning status "dubious year" flags UTCs that predate the
22906        *     introduction of the time scale and that are too far in the future
22907        *     to be trusted.  See jauDat  for further details.
22908        *
22909        *  <li> The function jauDtf2d  converts from calendar date and time of
22910        *     day into 2-part Julian Date, and in the case of UTC implements
22911        *     the leap-second-ambiguity convention described above.
22912        *
22913        *  <li> Delta UT1 can be obtained from tabulations provided by the
22914        *     International Earth Rotation and Reference Systems Service.  It
22915        *     It is the caller's responsibility to supply a DUT argument
22916        *     containing the UT1-UTC value that matches the given UTC.
22917        *
22918        *  <li> The returned ut11,ut12 are such that their sum is the UT1 Julian
22919        *     Date.
22920        *
22921        *  <li> The warning status "dubious year" flags UTCs that predate the
22922        *     introduction of the time scale and that are too far in the future
22923        *     to be trusted.  See jauDat for further details.
22924        *</ol>
22925        *<p>References:
22926        *
22927        *     McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
22928        *     IERS Technical Note No. 32, BKG (2004)
22929        *
22930        *     Explanatory Supplement to the Astronomical Almanac,
22931        *     P. Kenneth Seidelmann (ed), University Science Books (1992)
22932        *
22933        *  Called:<ul>
22934        *     <li>{@link #jauJd2cal}    JD to Gregorian calendar
22935        *     <li>{@link #jauDat}       delta(AT) = TAI-UTC
22936        *     <li>{@link #jauUtctai}    UTC to TAI
22937        *     <li>{@link #jauTaiut1}    TAI to UT1
22938        *</ul>
22939        *@version 2010 May 16
22940        *
22941        *@since SOFA release 2010-12-01
22942        *
22943        *  <!-- Copyright (C) 2010 IAU SOFA Board.  See notes at end. -->
22944      * @throws JSOFAInternalError 
22945      * @throws JSOFAIllegalParameter 
22946        */
22947       public static JulianDate jauUtcut1(double utc1, double utc2, double dut1) throws JSOFAIllegalParameter, JSOFAInternalError
22948       {
22949 
22950     
22951           double dta;
22952           /* Look up TAI-UTC. */
22953           Calendar dt = jauJd2cal(utc1, utc2) ;
22954           double dat = jauDat ( dt.iy, dt.im, dt.id, 0.0 );
22955      
22956 
22957           /* Form UT1-TAI. */
22958           dta = dut1 - dat;
22959 
22960           /* UTC to TAI to UT1. */
22961           JulianDate tai = jauUtctai(utc1, utc2);
22962           return jauTaiut1(tai.djm0, tai.djm1, dta) ;
22963 
22964       };
22965 
22966       
22967     public static CelestialIntermediatePole jauXy06(double date1, double date2)
22968     /**
22969     *  X,Y coordinates of celestial intermediate pole from series based
22970     *  on IAU 2006 precession and IAU 2000A nutation.
22971     *
22972     *<p>This function is derived from the International Astronomical Union's
22973     *  SOFA (Standards Of Fundamental Astronomy) software collection.
22974     *
22975     *<p>Status:  canonical model.
22976     *
22977     *<!-- Given: -->
22978     *     @param date1 double TT as a 2-part Julian Date (Note 1)
22979     *     @param date2 double TT as a 2-part Julian Date (Note 1)
22980     *
22981     *<!-- Returned: -->
22982     *     @return  CIP X,Y coordinates (Note 2)
22983     *
22984     * <p>Notes:
22985     * <ol>
22986     *
22987     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
22988     *     convenient way between the two arguments.  For example,
22989     *     JD(TT)=2450123.7 could be expressed in any of these ways,
22990     *     among others:
22991     *<pre>
22992     *            date1          date2
22993     *
22994     *         2450123.7           0.0       (JD method)
22995     *         2451545.0       -1421.3       (J2000 method)
22996     *         2400000.5       50123.2       (MJD method)
22997     *         2450123.5           0.2       (date &amp; time method)
22998     *</pre>
22999     *     The JD method is the most natural and convenient to use in
23000     *     cases where the loss of several decimal digits of resolution
23001     *     is acceptable.  The J2000 method is best matched to the way
23002     *     the argument is handled internally and will deliver the
23003     *     optimum resolution.  The MJD method and the date &amp; time methods
23004     *     are both good compromises between resolution and convenience.
23005     *
23006     * <li> The X,Y coordinates are those of the unit vector towards the
23007     *     celestial intermediate pole.  They represent the combined effects
23008     *     of frame bias, precession and nutation.
23009     *
23010     * <li> The fundamental arguments used are as adopted in IERS Conventions
23011     *     (2003) and are from Simon et al. (1994) and Souchay et al.
23012     *     (1999).
23013     *
23014     * <li> This is an alternative to the angles-based method, via the JSOFA
23015     *     function jauFw2xy and as used in jauXys06a for example.  The two
23016     *     methods agree at the 1 microarcsecond level (at present), a
23017     *     negligible amount compared with the intrinsic accuracy of the
23018     *     models.  However, it would be unwise to mix the two methods
23019     *     (angles-based and series-based) in a single application.
23020     *</ol>
23021     *<p>Called:<ul>
23022     *     <li>{@link #jauFal03} mean anomaly of the Moon
23023     *     <li>{@link #jauFalp03} mean anomaly of the Sun
23024     *     <li>{@link #jauFaf03} mean argument of the latitude of the Moon
23025     *     <li>{@link #jauFad03} mean elongation of the Moon from the Sun
23026     *     <li>{@link #jauFaom03} mean longitude of the Moon's ascending node
23027     *     <li>{@link #jauFame03} mean longitude of Mercury
23028     *     <li>{@link #jauFave03} mean longitude of Venus
23029     *     <li>{@link #jauFae03} mean longitude of Earth
23030     *     <li>{@link #jauFama03} mean longitude of Mars
23031     *     <li>{@link #jauFaju03} mean longitude of Jupiter
23032     *     <li>{@link #jauFasa03} mean longitude of Saturn
23033     *     <li>{@link #jauFaur03} mean longitude of Uranus
23034     *     <li>{@link #jauFane03} mean longitude of Neptune
23035     *     <li>{@link #jauFapa03} general accumulated precession in longitude
23036     * </ul>
23037     *<p>References:
23038     *
23039     *    <p>Capitaine, N., Wallace, P.T. &amp; Chapront, J., 2003,
23040     *     Astron.Astrophys., 412, 567
23041     *
23042     *    <p>Capitaine, N. &amp; Wallace, P.T., 2006, Astron.Astrophys. 450, 855
23043     *
23044     *     <p>McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003),
23045     *     IERS Technical Note No. 32, BKG
23046     *
23047     *     Simon, J.L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
23048     *     Francou, G. &amp; Laskar, J., Astron.Astrophys., 1994, 282, 663
23049     *
23050     *     Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M., 1999,
23051     *     Astron.Astrophys.Supp.Ser. 135, 111
23052     *
23053     *    <p>Wallace, P.T. &amp; Capitaine, N., 2006, Astron.Astrophys. 459, 981
23054     *
23055     *@version 2009 October 16
23056     *
23057     *  @since Release 20101201
23058     *
23059     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
23060     */
23061     {
23062 
23063     /* Maximum power of T in the polynomials for X and Y */
23064        final int MAXPT = (5);
23065 
23066     /* Polynomial coefficients (arcsec, X then Y). */
23067        final double xyp[][] = {
23068 
23069           {    -0.016617,
23070              2004.191898,
23071                -0.4297829,
23072                -0.19861834,
23073                 0.000007578,
23074                 0.0000059285
23075           },
23076           {    -0.006951,
23077                -0.025896,
23078               -22.4072747,
23079                 0.00190059,
23080                 0.001112526,
23081                 0.0000001358
23082           }
23083        };
23084 
23085     /* N.B mfals defined as class static (outside this method) to avoid problems with 65535 byte limit for methods */ 
23086     /* Number of frequencies:  luni-solar */
23087         final int NFLS = mfals.length;
23088 
23089     /* Number of frequencies:  planetary */
23090        final int NFPL =mfapl.length ;
23091 
23092     /* Pointers into amplitudes array, one pointer per frequency */
23093        final int nc[] = {
23094 
23095        /* 1-100 */
23096            1,    21,    37,    51,    65,    79,    91,   103,   115,   127,
23097          139,   151,   163,   172,   184,   196,   207,   219,   231,   240,
23098          252,   261,   273,   285,   297,   309,   318,   327,   339,   351,
23099          363,   372,   384,   396,   405,   415,   423,   435,   444,   452,
23100          460,   467,   474,   482,   490,   498,   506,   513,   521,   528,
23101          536,   543,   551,   559,   566,   574,   582,   590,   597,   605,
23102          613,   620,   628,   636,   644,   651,   658,   666,   674,   680,
23103          687,   695,   702,   710,   717,   725,   732,   739,   746,   753,
23104          760,   767,   774,   782,   790,   798,   805,   812,   819,   826,
23105          833,   840,   846,   853,   860,   867,   874,   881,   888,   895,
23106 
23107        /* 101-200 */
23108          901,   908,   914,   921,   928,   934,   941,   948,   955,   962,
23109          969,   976,   982,   989,   996,  1003,  1010,  1017,  1024,  1031,
23110         1037,  1043,  1050,  1057,  1064,  1071,  1078,  1084,  1091,  1098,
23111         1104,  1112,  1118,  1124,  1131,  1138,  1145,  1151,  1157,  1164,
23112         1171,  1178,  1185,  1192,  1199,  1205,  1212,  1218,  1226,  1232,
23113         1239,  1245,  1252,  1259,  1266,  1272,  1278,  1284,  1292,  1298,
23114         1304,  1310,  1316,  1323,  1329,  1335,  1341,  1347,  1353,  1359,
23115         1365,  1371,  1377,  1383,  1389,  1396,  1402,  1408,  1414,  1420,
23116         1426,  1434,  1440,  1446,  1452,  1459,  1465,  1471,  1477,  1482,
23117         1488,  1493,  1499,  1504,  1509,  1514,  1520,  1527,  1532,  1538,
23118 
23119        /* 201-300 */
23120         1543,  1548,  1553,  1558,  1564,  1569,  1574,  1579,  1584,  1589,
23121         1594,  1596,  1598,  1600,  1602,  1605,  1608,  1610,  1612,  1617,
23122         1619,  1623,  1625,  1627,  1629,  1632,  1634,  1640,  1642,  1644,
23123         1646,  1648,  1650,  1652,  1654,  1658,  1660,  1662,  1664,  1668,
23124         1670,  1672,  1673,  1675,  1679,  1681,  1683,  1684,  1686,  1688,
23125         1690,  1693,  1695,  1697,  1701,  1703,  1705,  1707,  1709,  1711,
23126         1712,  1715,  1717,  1721,  1723,  1725,  1727,  1729,  1731,  1733,
23127         1735,  1737,  1739,  1741,  1743,  1745,  1747,  1749,  1751,  1753,
23128         1755,  1757,  1759,  1761,  1762,  1764,  1766,  1768,  1769,  1771,
23129         1773,  1775,  1777,  1779,  1781,  1783,  1785,  1787,  1788,  1790,
23130 
23131        /* 301-400 */
23132         1792,  1794,  1796,  1798,  1800,  1802,  1804,  1806,  1807,  1809,
23133         1811,  1815,  1817,  1819,  1821,  1823,  1825,  1827,  1829,  1831,
23134         1833,  1835,  1837,  1839,  1840,  1842,  1844,  1848,  1850,  1852,
23135         1854,  1856,  1858,  1859,  1860,  1862,  1864,  1866,  1868,  1869,
23136         1871,  1873,  1875,  1877,  1879,  1881,  1883,  1885,  1887,  1889,
23137         1891,  1892,  1896,  1898,  1900,  1901,  1903,  1905,  1907,  1909,
23138         1910,  1911,  1913,  1915,  1919,  1921,  1923,  1927,  1929,  1931,
23139         1933,  1935,  1937,  1939,  1943,  1945,  1947,  1948,  1949,  1951,
23140         1953,  1955,  1957,  1958,  1960,  1962,  1964,  1966,  1968,  1970,
23141         1971,  1973,  1974,  1975,  1977,  1979,  1980,  1981,  1982,  1984,
23142 
23143        /* 401-500 */
23144         1986,  1988,  1990,  1992,  1994,  1995,  1997,  1999,  2001,  2003,
23145         2005,  2007,  2008,  2009,  2011,  2013,  2015,  2017,  2019,  2021,
23146         2023,  2024,  2025,  2027,  2029,  2031,  2033,  2035,  2037,  2041,
23147         2043,  2045,  2046,  2047,  2049,  2051,  2053,  2055,  2056,  2057,
23148         2059,  2061,  2063,  2065,  2067,  2069,  2070,  2071,  2072,  2074,
23149         2076,  2078,  2080,  2082,  2084,  2086,  2088,  2090,  2092,  2094,
23150         2095,  2096,  2097,  2099,  2101,  2105,  2106,  2107,  2108,  2109,
23151         2110,  2111,  2113,  2115,  2119,  2121,  2123,  2125,  2127,  2129,
23152         2131,  2133,  2135,  2136,  2137,  2139,  2141,  2143,  2145,  2147,
23153         2149,  2151,  2153,  2155,  2157,  2159,  2161,  2163,  2165,  2167,
23154 
23155        /* 501-600 */
23156         2169,  2171,  2173,  2175,  2177,  2179,  2181,  2183,  2185,  2186,
23157         2187,  2188,  2192,  2193,  2195,  2197,  2199,  2201,  2203,  2205,
23158         2207,  2209,  2211,  2213,  2217,  2219,  2221,  2223,  2225,  2227,
23159         2229,  2231,  2233,  2234,  2235,  2236,  2237,  2238,  2239,  2240,
23160         2241,  2244,  2246,  2248,  2250,  2252,  2254,  2256,  2258,  2260,
23161         2262,  2264,  2266,  2268,  2270,  2272,  2274,  2276,  2278,  2280,
23162         2282,  2284,  2286,  2288,  2290,  2292,  2294,  2296,  2298,  2300,
23163         2302,  2303,  2304,  2305,  2306,  2307,  2309,  2311,  2313,  2315,
23164         2317,  2319,  2321,  2323,  2325,  2327,  2329,  2331,  2333,  2335,
23165         2337,  2341,  2343,  2345,  2347,  2349,  2351,  2352,  2355,  2356,
23166 
23167        /* 601-700 */
23168         2357,  2358,  2359,  2361,  2363,  2364,  2365,  2366,  2367,  2368,
23169         2369,  2370,  2371,  2372,  2373,  2374,  2376,  2378,  2380,  2382,
23170         2384,  2385,  2386,  2387,  2388,  2389,  2390,  2391,  2392,  2393,
23171         2394,  2395,  2396,  2397,  2398,  2399,  2400,  2401,  2402,  2403,
23172         2404,  2405,  2406,  2407,  2408,  2409,  2410,  2411,  2412,  2413,
23173         2414,  2415,  2417,  2418,  2430,  2438,  2445,  2453,  2460,  2468,
23174         2474,  2480,  2488,  2496,  2504,  2512,  2520,  2527,  2535,  2543,
23175         2550,  2558,  2566,  2574,  2580,  2588,  2596,  2604,  2612,  2619,
23176         2627,  2634,  2642,  2648,  2656,  2664,  2671,  2679,  2685,  2693,
23177         2701,  2709,  2717,  2725,  2733,  2739,  2747,  2753,  2761,  2769,
23178 
23179        /* 701-800 */
23180         2777,  2785,  2793,  2801,  2809,  2817,  2825,  2833,  2841,  2848,
23181         2856,  2864,  2872,  2878,  2884,  2892,  2898,  2906,  2914,  2922,
23182         2930,  2938,  2944,  2952,  2958,  2966,  2974,  2982,  2988,  2996,
23183         3001,  3009,  3017,  3025,  3032,  3039,  3045,  3052,  3059,  3067,
23184         3069,  3076,  3083,  3090,  3098,  3105,  3109,  3111,  3113,  3120,
23185         3124,  3128,  3132,  3136,  3140,  3144,  3146,  3150,  3158,  3161,
23186         3165,  3166,  3168,  3172,  3176,  3180,  3182,  3185,  3189,  3193,
23187         3194,  3197,  3200,  3204,  3208,  3212,  3216,  3219,  3221,  3222,
23188         3226,  3230,  3234,  3238,  3242,  3243,  3247,  3251,  3254,  3258,
23189         3262,  3266,  3270,  3274,  3275,  3279,  3283,  3287,  3289,  3293,
23190 
23191        /* 801-900 */
23192         3296,  3300,  3303,  3307,  3311,  3315,  3319,  3321,  3324,  3327,
23193         3330,  3334,  3338,  3340,  3342,  3346,  3350,  3354,  3358,  3361,
23194         3365,  3369,  3373,  3377,  3381,  3385,  3389,  3393,  3394,  3398,
23195         3402,  3406,  3410,  3413,  3417,  3421,  3425,  3429,  3433,  3435,
23196         3439,  3443,  3446,  3450,  3453,  3457,  3458,  3461,  3464,  3468,
23197         3472,  3476,  3478,  3481,  3485,  3489,  3493,  3497,  3501,  3505,
23198         3507,  3511,  3514,  3517,  3521,  3524,  3525,  3527,  3529,  3533,
23199         3536,  3540,  3541,  3545,  3548,  3551,  3555,  3559,  3563,  3567,
23200         3569,  3570,  3574,  3576,  3578,  3582,  3586,  3590,  3593,  3596,
23201         3600,  3604,  3608,  3612,  3616,  3620,  3623,  3626,  3630,  3632,
23202 
23203        /* 901-1000 */
23204         3636,  3640,  3643,  3646,  3648,  3652,  3656,  3660,  3664,  3667,
23205         3669,  3671,  3675,  3679,  3683,  3687,  3689,  3693,  3694,  3695,
23206         3699,  3703,  3705,  3707,  3710,  3713,  3717,  3721,  3725,  3729,
23207         3733,  3736,  3740,  3744,  3748,  3752,  3754,  3757,  3759,  3763,
23208         3767,  3770,  3773,  3777,  3779,  3783,  3786,  3790,  3794,  3798,
23209         3801,  3805,  3809,  3813,  3817,  3821,  3825,  3827,  3831,  3835,
23210         3836,  3837,  3840,  3844,  3848,  3852,  3856,  3859,  3863,  3867,
23211         3869,  3871,  3875,  3879,  3883,  3887,  3890,  3894,  3898,  3901,
23212         3905,  3909,  3913,  3917,  3921,  3922,  3923,  3924,  3926,  3930,
23213         3932,  3936,  3938,  3940,  3944,  3948,  3952,  3956,  3959,  3963,
23214 
23215        /* 1001-1100 */
23216         3965,  3969,  3973,  3977,  3979,  3981,  3982,  3986,  3989,  3993,
23217         3997,  4001,  4004,  4006,  4009,  4012,  4016,  4020,  4024,  4026,
23218         4028,  4032,  4036,  4040,  4044,  4046,  4050,  4054,  4058,  4060,
23219         4062,  4063,  4064,  4068,  4071,  4075,  4077,  4081,  4083,  4087,
23220         4089,  4091,  4095,  4099,  4101,  4103,  4105,  4107,  4111,  4115,
23221         4119,  4123,  4127,  4129,  4131,  4135,  4139,  4141,  4143,  4145,
23222         4149,  4153,  4157,  4161,  4165,  4169,  4173,  4177,  4180,  4183,
23223         4187,  4191,  4195,  4198,  4201,  4205,  4209,  4212,  4213,  4216,
23224         4217,  4221,  4223,  4226,  4230,  4234,  4236,  4240,  4244,  4248,
23225         4252,  4256,  4258,  4262,  4264,  4266,  4268,  4270,  4272,  4276,
23226 
23227        /* 1101-1200 */
23228         4279,  4283,  4285,  4287,  4289,  4293,  4295,  4299,  4300,  4301,
23229         4305,  4309,  4313,  4317,  4319,  4323,  4325,  4329,  4331,  4333,
23230         4335,  4337,  4341,  4345,  4349,  4351,  4353,  4357,  4361,  4365,
23231         4367,  4369,  4373,  4377,  4381,  4383,  4387,  4389,  4391,  4395,
23232         4399,  4403,  4407,  4411,  4413,  4414,  4415,  4418,  4419,  4421,
23233         4423,  4427,  4429,  4431,  4433,  4435,  4437,  4439,  4443,  4446,
23234         4450,  4452,  4456,  4458,  4460,  4462,  4466,  4469,  4473,  4477,
23235         4481,  4483,  4487,  4489,  4491,  4493,  4497,  4499,  4501,  4504,
23236         4506,  4510,  4513,  4514,  4515,  4518,  4521,  4522,  4525,  4526,
23237         4527,  4530,  4533,  4534,  4537,  4541,  4542,  4543,  4544,  4545,
23238 
23239        /* 1201-1300 */
23240         4546,  4547,  4550,  4553,  4554,  4555,  4558,  4561,  4564,  4567,
23241         4568,  4571,  4574,  4575,  4578,  4581,  4582,  4585,  4586,  4588,
23242         4590,  4592,  4596,  4598,  4602,  4604,  4608,  4612,  4613,  4616,
23243         4619,  4622,  4623,  4624,  4625,  4626,  4629,  4632,  4633,  4636,
23244         4639,  4640,  4641,  4642,  4643,  4644,  4645,  4648,  4649,  4650,
23245         4651,  4652,  4653,  4656,  4657,  4660,  4661,  4664,  4667,  4670,
23246         4671,  4674,  4675,  4676,  4677,  4678,  4681,  4682,  4683,  4684,
23247         4687,  4688,  4689,  4692,  4693,  4696,  4697,  4700,  4701,  4702,
23248         4703,  4704,  4707,  4708,  4711,  4712,  4715,  4716,  4717,  4718,
23249         4719,  4720,  4721,  4722,  4723,  4726,  4729,  4730,  4733,  4736,
23250 
23251        /* 1301-(NFLS+NFPL) */
23252         4737,  4740,  4741,  4742,  4745,  4746,  4749,  4752,  4753
23253        };
23254 
23255     /* Amplitude coefficients (microarcsec);  indexed using the nc array. */
23256        final double a[] = {
23257 
23258        /* 1-105 */
23259              -6844318.44,     9205236.26,1328.67,1538.18,      205833.11,
23260                153041.79,       -3309.73, 853.32,2037.98,       -2301.27,
23261            81.46, 120.56, -20.39, -15.22,   1.73,  -1.61,  -0.10,   0.11,
23262            -0.02,  -0.02,     -523908.04,      573033.42,-544.75,-458.66,
23263                 12814.01,       11714.49, 198.97,-290.91, 155.74,-143.27,
23264            -2.75,  -1.03,  -1.27,  -1.16,   0.00,  -0.01,      -90552.22,
23265                 97846.69, 111.23, 137.41,2187.91,2024.68,  41.44, -51.26,
23266            26.92, -24.46,  -0.46,  -0.28,  -0.22,  -0.20,       82168.76,
23267                -89618.24, -27.64, -29.05,       -2004.36,       -1837.32,
23268           -36.07,  48.00, -24.43,  22.41,   0.47,   0.24,   0.20,   0.18,
23269                 58707.02,7387.02, 470.05,-192.40, 164.33,       -1312.21,
23270          -179.73, -28.93, -17.36,  -1.83,  -0.50,   3.57,   0.00,   0.13,
23271                -20557.78,       22438.42, -20.84, -17.40, 501.82, 459.68,
23272            59.20, -67.30,   6.08,  -5.61,  -1.36,  -1.19,       28288.28,
23273          -674.99, -34.69,  35.80, -15.07,-632.54, -11.19,   0.78,  -8.41,
23274             0.17,   0.01,   0.07,      -15406.85,       20069.50,  15.12,
23275 
23276        /* 106-219 */
23277            31.80, 448.76, 344.50,  -5.77,   1.41,   4.59,  -5.02,   0.17,
23278             0.24,      -11991.74,       12902.66,  32.46,  36.70, 288.49,
23279           268.14,   5.70,  -7.06,   3.57,  -3.23,  -0.06,  -0.04,
23280                 -8584.95,       -9592.72,   4.42, -13.20,-214.50, 192.06,
23281            23.87,  29.83,   2.54,   2.40,   0.60,  -0.48,5095.50,
23282                 -6918.22,   7.19,   3.92,-154.91,-113.94,   2.86,  -1.04,
23283            -1.52,   1.73,  -0.07,  -0.10,       -4910.93,       -5331.13,
23284             0.76,   0.40,-119.21, 109.81,   2.16,   3.20,   1.46,   1.33,
23285             0.04,  -0.02,       -6245.02,-123.48,  -6.68,  -8.20,  -2.76,
23286           139.64,   2.71,   0.15,   1.86,2511.85,       -3323.89,   1.07,
23287            -0.90, -74.33, -56.17,   1.16,  -0.01,  -0.75,   0.83,  -0.02,
23288            -0.04,2307.58,3143.98,  -7.52,   7.50,  70.31, -51.60,   1.46,
23289             0.16,  -0.69,  -0.79,   0.02,  -0.05,2372.58,2554.51,   5.93,
23290            -6.60,  57.12, -53.05,  -0.96,  -1.24,  -0.71,  -0.64,  -0.01,
23291                 -2053.16,2636.13,   5.13,   7.80,  58.94,  45.91,  -0.42,
23292            -0.12,   0.61,  -0.66,   0.02,   0.03,       -1825.49,
23293 
23294        /* 220-339 */
23295                 -2423.59,   1.23,  -2.00, -54.19,  40.82,  -1.07,  -1.02,
23296             0.54,   0.61,  -0.04,   0.04,2521.07,-122.28,  -5.97,   2.90,
23297            -2.73, -56.37,  -0.82,   0.13,  -0.75,       -1534.09,1645.01,
23298             6.29,   6.80,  36.78,  34.30,   0.92,  -1.25,   0.46,  -0.41,
23299            -0.02,  -0.01,1898.27,  47.70,  -0.72,   2.50,   1.07, -42.45,
23300            -0.94,   0.02,  -0.56,       -1292.02,       -1387.00,   0.00,
23301             0.00, -31.01,  28.89,   0.68,   0.00,   0.38,   0.35,  -0.01,
23302            -0.01,       -1234.96,1323.81,   5.21,   5.90,  29.60,  27.61,
23303             0.74,  -1.22,   0.37,  -0.33,  -0.02,  -0.01,1137.48,
23304                 -1233.89,  -0.04,  -0.30, -27.59, -25.43,  -0.61,   1.00,
23305            -0.34,   0.31,   0.01,   0.01,-813.13,       -1075.60,   0.40,
23306             0.30, -24.05,  18.18,  -0.40,  -0.01,   0.24,   0.27,  -0.01,
23307             0.01,1163.22, -60.90,  -2.94,   1.30,  -1.36, -26.01,  -0.58,
23308             0.07,  -0.35,1029.70, -55.55,  -2.63,   1.10,  -1.25, -23.02,
23309            -0.52,   0.06,  -0.31,-556.26, 852.85,   3.16,  -4.48,  19.06,
23310            12.44,  -0.81,  -0.27,   0.17,  -0.21,   0.00,   0.02,-603.52,
23311 
23312        /* 340-467 */
23313          -800.34,   0.44,   0.10, -17.90,  13.49,  -0.08,  -0.01,   0.18,
23314             0.20,  -0.01,   0.01,-628.24, 684.99,  -0.64,  -0.50,  15.32,
23315            14.05,   3.18,  -4.19,   0.19,  -0.17,  -0.09,  -0.07,-866.48,
23316           -16.26,   0.52,  -1.30,  -0.36,  19.37,   0.43,  -0.01,   0.26,
23317          -512.37, 695.54,  -1.47,  -1.40,  15.55,  11.46,  -0.16,   0.03,
23318             0.15,  -0.17,   0.01,   0.01, 506.65, 643.75,   2.54,  -2.62,
23319            14.40, -11.33,  -0.77,  -0.06,  -0.15,  -0.16,   0.00,   0.01,
23320           664.57,  16.81,  -0.40,   1.00,   0.38, -14.86,  -3.71,  -0.09,
23321            -0.20, 405.91, 522.11,   0.99,  -1.50,  11.67,  -9.08,  -0.25,
23322            -0.02,  -0.12,  -0.13,-305.78, 326.60,   1.75,   1.90,   7.30,
23323             6.84,   0.20,  -0.04, 300.99,-325.03,  -0.44,  -0.50,  -7.27,
23324            -6.73,  -1.01,   0.01,   0.00,   0.08,   0.00,   0.02, 438.51,
23325            10.47,  -0.56,  -0.20,   0.24,  -9.81,  -0.24,   0.01,  -0.13,
23326          -264.02, 335.24,   0.99,   1.40,   7.49,   5.90,  -0.27,  -0.02,
23327           284.09, 307.03,   0.32,  -0.40,   6.87,  -6.35,  -0.99,  -0.01,
23328          -250.54, 327.11,   0.08,   0.40,   7.31,   5.60,  -0.30, 230.72,
23329 
23330        /* 468-595 */
23331          -304.46,   0.08,  -0.10,  -6.81,  -5.16,   0.27, 229.78, 304.17,
23332            -0.60,   0.50,   6.80,  -5.14,   0.33,   0.01, 256.30,-276.81,
23333            -0.28,  -0.40,  -6.19,  -5.73,  -0.14,   0.01,-212.82, 269.45,
23334             0.84,   1.20,   6.02,   4.76,   0.14,  -0.02, 196.64, 272.05,
23335            -0.84,   0.90,   6.08,  -4.40,   0.35,   0.02, 188.95, 272.22,
23336            -0.12,   0.30,   6.09,  -4.22,   0.34,-292.37,  -5.10,  -0.32,
23337            -0.40,  -0.11,   6.54,   0.14,   0.01, 161.79,-220.67,   0.24,
23338             0.10,  -4.93,  -3.62,  -0.08, 261.54, -19.94,  -0.95,   0.20,
23339            -0.45,  -5.85,  -0.13,   0.02, 142.16,-190.79,   0.20,   0.10,
23340            -4.27,  -3.18,  -0.07, 187.95,  -4.11,  -0.24,   0.30,  -0.09,
23341            -4.20,  -0.09,   0.01,   0.00,   0.00, -79.08, 167.90,   0.04,
23342             0.00,   3.75,   1.77, 121.98, 131.04,  -0.08,   0.10,   2.93,
23343            -2.73,  -0.06,-172.95,  -8.11,  -0.40,  -0.20,  -0.18,   3.87,
23344             0.09,   0.01,-160.15, -55.30, -14.04,  13.90,  -1.23,   3.58,
23345             0.40,   0.31,-115.40, 123.20,   0.60,   0.70,   2.75,   2.58,
23346             0.08,  -0.01,-168.26,  -2.00,   0.20,  -0.20,  -0.04,   3.76,
23347 
23348        /* 596-723 */
23349             0.08,-114.49, 123.20,   0.32,   0.40,   2.75,   2.56,   0.07,
23350            -0.01, 112.14, 120.70,   0.28,  -0.30,   2.70,  -2.51,  -0.07,
23351            -0.01, 161.34,   4.03,   0.20,   0.20,   0.09,  -3.61,  -0.08,
23352            91.31, 126.64,  -0.40,   0.40,   2.83,  -2.04,  -0.04,   0.01,
23353           105.29, 112.90,   0.44,  -0.50,   2.52,  -2.35,  -0.07,  -0.01,
23354            98.69,-106.20,  -0.28,  -0.30,  -2.37,  -2.21,  -0.06,   0.01,
23355            86.74,-112.94,  -0.08,  -0.20,  -2.53,  -1.94,  -0.05,-134.81,
23356             3.51,   0.20,  -0.20,   0.08,   3.01,   0.07,  79.03, 107.31,
23357            -0.24,   0.20,   2.40,  -1.77,  -0.04,   0.01, 132.81, -10.77,
23358            -0.52,   0.10,  -0.24,  -2.97,  -0.07,   0.01,-130.31,  -0.90,
23359             0.04,   0.00,   0.00,   2.91, -78.56,  85.32,   0.00,   0.00,
23360             1.91,   1.76,   0.04,   0.00,   0.00, -41.53,  89.10,   0.02,
23361             0.00,   1.99,   0.93,  66.03, -71.00,  -0.20,  -0.20,  -1.59,
23362            -1.48,  -0.04,  60.50,  64.70,   0.36,  -0.40,   1.45,  -1.35,
23363            -0.04,  -0.01, -52.27, -70.01,   0.00,   0.00,  -1.57,   1.17,
23364             0.03, -52.95,  66.29,   0.32,   0.40,   1.48,   1.18,   0.04,
23365 
23366        /* 724-851 */
23367            -0.01,  51.02,  67.25,   0.00,   0.00,   1.50,  -1.14,  -0.03,
23368           -55.66, -60.92,   0.16,  -0.20,  -1.36,   1.24,   0.03, -54.81,
23369           -59.20,  -0.08,   0.20,  -1.32,   1.23,   0.03,  51.32, -55.60,
23370             0.00,   0.00,  -1.24,  -1.15,  -0.03,  48.29,  51.80,   0.20,
23371            -0.20,   1.16,  -1.08,  -0.03, -45.59, -49.00,  -0.12,   0.10,
23372            -1.10,   1.02,   0.03,  40.54, -52.69,  -0.04,  -0.10,  -1.18,
23373            -0.91,  -0.02, -40.58, -49.51,  -1.00,   1.00,  -1.11,   0.91,
23374             0.04,   0.02, -43.76,  46.50,   0.36,   0.40,   1.04,   0.98,
23375             0.03,  -0.01,  62.65,  -5.00,  -0.24,   0.00,  -0.11,  -1.40,
23376            -0.03,   0.01, -38.57,  49.59,   0.08,   0.10,   1.11,   0.86,
23377             0.02, -33.22, -44.04,   0.08,  -0.10,  -0.98,   0.74,   0.02,
23378            37.15, -39.90,  -0.12,  -0.10,  -0.89,  -0.83,  -0.02,  36.68,
23379           -39.50,  -0.04,  -0.10,  -0.88,  -0.82,  -0.02, -53.22,  -3.91,
23380            -0.20,   0.00,  -0.09,   1.19,   0.03,  32.43, -42.19,  -0.04,
23381            -0.10,  -0.94,  -0.73,  -0.02, -51.00,  -2.30,  -0.12,  -0.10,
23382             0.00,   1.14, -29.53, -39.11,   0.04,   0.00,  -0.87,   0.66,
23383 
23384        /* 852-979 */
23385             0.02,  28.50, -38.92,  -0.08,  -0.10,  -0.87,  -0.64,  -0.02,
23386            26.54,  36.95,  -0.12,   0.10,   0.83,  -0.59,  -0.01,  26.54,
23387            34.59,   0.04,  -0.10,   0.77,  -0.59,  -0.02,  28.35, -32.55,
23388            -0.16,   0.20,  -0.73,  -0.63,  -0.01, -28.00,  30.40,   0.00,
23389             0.00,   0.68,   0.63,   0.01, -27.61,  29.40,   0.20,   0.20,
23390             0.66,   0.62,   0.02,  40.33,   0.40,  -0.04,   0.10,   0.00,
23391            -0.90, -23.28,  31.61,  -0.08,  -0.10,   0.71,   0.52,   0.01,
23392            37.75,   0.80,   0.04,   0.10,   0.00,  -0.84,  23.66,  25.80,
23393             0.00,   0.00,   0.58,  -0.53,  -0.01,  21.01, -27.91,   0.00,
23394             0.00,  -0.62,  -0.47,  -0.01, -34.81,   2.89,   0.04,   0.00,
23395             0.00,   0.78, -23.49, -25.31,   0.00,   0.00,  -0.57,   0.53,
23396             0.01, -23.47,  25.20,   0.16,   0.20,   0.56,   0.52,   0.02,
23397            19.58,  27.50,  -0.12,   0.10,   0.62,  -0.44,  -0.01, -22.67,
23398           -24.40,  -0.08,   0.10,  -0.55,   0.51,   0.01, -19.97,  25.00,
23399             0.12,   0.20,   0.56,   0.45,   0.01,  21.28, -22.80,  -0.08,
23400            -0.10,  -0.51,  -0.48,  -0.01, -30.47,   0.91,   0.04,   0.00,
23401 
23402        /* 980-1107 */
23403             0.00,   0.68,  18.58,  24.00,   0.04,  -0.10,   0.54,  -0.42,
23404            -0.01, -18.02,  24.40,  -0.04,  -0.10,   0.55,   0.40,   0.01,
23405            17.74,  22.50,   0.08,  -0.10,   0.50,  -0.40,  -0.01, -19.41,
23406            20.70,   0.08,   0.10,   0.46,   0.43,   0.01, -18.64,  20.11,
23407             0.00,   0.00,   0.45,   0.42,   0.01, -16.75,  21.60,   0.04,
23408             0.10,   0.48,   0.37,   0.01, -18.42, -20.00,   0.00,   0.00,
23409            -0.45,   0.41,   0.01, -26.77,   1.41,   0.08,   0.00,   0.00,
23410             0.60, -26.17,  -0.19,   0.00,   0.00,   0.00,   0.59, -15.52,
23411            20.51,   0.00,   0.00,   0.46,   0.35,   0.01, -25.42,  -1.91,
23412            -0.08,   0.00,  -0.04,   0.57,   0.45, -17.42,  18.10,   0.00,
23413             0.00,   0.40,   0.39,   0.01,  16.39, -17.60,  -0.08,  -0.10,
23414            -0.39,  -0.37,  -0.01, -14.37,  18.91,   0.00,   0.00,   0.42,
23415             0.32,   0.01,  23.39,  -2.40,  -0.12,   0.00,   0.00,  -0.52,
23416            14.32, -18.50,  -0.04,  -0.10,  -0.41,  -0.32,  -0.01,  15.69,
23417            17.08,   0.00,   0.00,   0.38,  -0.35,  -0.01, -22.99,   0.50,
23418             0.04,   0.00,   0.00,   0.51,   0.00,   0.00,  14.47, -17.60,
23419 
23420        /* 1108-1235 */
23421            -0.01,   0.00,  -0.39,  -0.32, -13.33,  18.40,  -0.04,  -0.10,
23422             0.41,   0.30,  22.47,  -0.60,  -0.04,   0.00,   0.00,  -0.50,
23423           -12.78, -17.41,   0.04,   0.00,  -0.39,   0.29,   0.01, -14.10,
23424           -15.31,   0.04,   0.00,  -0.34,   0.32,   0.01,  11.98,  16.21,
23425            -0.04,   0.00,   0.36,  -0.27,  -0.01,  19.65,  -1.90,  -0.08,
23426             0.00,   0.00,  -0.44,  19.61,  -1.50,  -0.08,   0.00,   0.00,
23427            -0.44,  13.41, -14.30,  -0.04,  -0.10,  -0.32,  -0.30,  -0.01,
23428           -13.29,  14.40,   0.00,   0.00,   0.32,   0.30,   0.01,  11.14,
23429           -14.40,  -0.04,   0.00,  -0.32,  -0.25,  -0.01,  12.24, -13.38,
23430             0.04,   0.00,  -0.30,  -0.27,  -0.01,  10.07, -13.81,   0.04,
23431             0.00,  -0.31,  -0.23,  -0.01,  10.46,  13.10,   0.08,  -0.10,
23432             0.29,  -0.23,  -0.01,  16.55,  -1.71,  -0.08,   0.00,   0.00,
23433            -0.37,   9.75, -12.80,   0.00,   0.00,  -0.29,  -0.22,  -0.01,
23434             9.11,  12.80,   0.00,   0.00,   0.29,  -0.20,   0.00,   0.00,
23435            -6.44, -13.80,   0.00,   0.00,  -0.31,   0.14,  -9.19, -12.00,
23436             0.00,   0.00,  -0.27,   0.21, -10.30,  10.90,   0.08,   0.10,
23437 
23438        /* 1236-1363 */
23439             0.24,   0.23,   0.01,  14.92,  -0.80,  -0.04,   0.00,   0.00,
23440            -0.33,  10.02, -10.80,   0.00,   0.00,  -0.24,  -0.22,  -0.01,
23441            -9.75,  10.40,   0.04,   0.00,   0.23,   0.22,   0.01,   9.67,
23442           -10.40,  -0.04,   0.00,  -0.23,  -0.22,  -0.01,  -8.28, -11.20,
23443             0.04,   0.00,  -0.25,   0.19,  13.32,  -1.41,  -0.08,   0.00,
23444             0.00,  -0.30,   8.27,  10.50,   0.04,   0.00,   0.23,  -0.19,
23445             0.00,   0.00,  13.13,   0.00,   0.00,   0.00,   0.00,  -0.29,
23446           -12.93,   0.70,   0.04,   0.00,   0.00,   0.29,   7.91, -10.20,
23447             0.00,   0.00,  -0.23,  -0.18,  -7.84, -10.00,  -0.04,   0.00,
23448            -0.22,   0.18,   7.44,   9.60,   0.00,   0.00,   0.21,  -0.17,
23449            -7.64,   9.40,   0.08,   0.10,   0.21,   0.17,   0.01, -11.38,
23450             0.60,   0.04,   0.00,   0.00,   0.25,  -7.48,   8.30,   0.00,
23451             0.00,   0.19,   0.17, -10.98,  -0.20,   0.00,   0.00,   0.00,
23452             0.25,  10.98,   0.20,   0.00,   0.00,   0.00,  -0.25,   7.40,
23453            -7.90,  -0.04,   0.00,  -0.18,  -0.17,  -6.09,   8.40,  -0.04,
23454             0.00,   0.19,   0.14,  -6.94,  -7.49,   0.00,   0.00,  -0.17,
23455 
23456        /* 1364-1491 */
23457             0.16,   6.92,   7.50,   0.04,   0.00,   0.17,  -0.15,   6.20,
23458             8.09,   0.00,   0.00,   0.18,  -0.14,  -6.12,   7.80,   0.04,
23459             0.00,   0.17,   0.14,   5.85,  -7.50,   0.00,   0.00,  -0.17,
23460            -0.13,  -6.48,   6.90,   0.08,   0.10,   0.15,   0.14,   0.01,
23461             6.32,   6.90,   0.00,   0.00,   0.15,  -0.14,   5.61,  -7.20,
23462             0.00,   0.00,  -0.16,  -0.13,   9.07,   0.00,   0.00,   0.00,
23463             0.00,  -0.20,   5.25,   6.90,   0.00,   0.00,   0.15,  -0.12,
23464            -8.47,  -0.40,   0.00,   0.00,   0.00,   0.19,   6.32,  -5.39,
23465            -1.11,   1.10,  -0.12,  -0.14,   0.02,   0.02,   5.73,  -6.10,
23466            -0.04,   0.00,  -0.14,  -0.13,   4.70,   6.60,  -0.04,   0.00,
23467             0.15,  -0.11,  -4.90,  -6.40,   0.00,   0.00,  -0.14,   0.11,
23468            -5.33,   5.60,   0.04,   0.10,   0.13,   0.12,   0.01,  -4.81,
23469             6.00,   0.04,   0.00,   0.13,   0.11,   5.13,   5.50,   0.04,
23470             0.00,   0.12,  -0.11,   4.50,   5.90,   0.00,   0.00,   0.13,
23471            -0.10,  -4.22,   6.10,   0.00,   0.00,   0.14,  -4.53,   5.70,
23472             0.00,   0.00,   0.13,   0.10,   4.18,   5.70,   0.00,   0.00,
23473 
23474        /* 1492-1619 */
23475             0.13,  -4.75,  -5.19,   0.00,   0.00,  -0.12,   0.11,  -4.06,
23476             5.60,   0.00,   0.00,   0.13,  -3.98,   5.60,  -0.04,   0.00,
23477             0.13,   4.02,  -5.40,   0.00,   0.00,  -0.12,   4.49,  -4.90,
23478            -0.04,   0.00,  -0.11,  -0.10,  -3.62,  -5.40,  -0.16,   0.20,
23479            -0.12,   0.00,   0.01,   4.38,   4.80,   0.00,   0.00,   0.11,
23480            -6.40,  -0.10,   0.00,   0.00,   0.00,   0.14,  -3.98,   5.00,
23481             0.04,   0.00,   0.11,  -3.82,  -5.00,   0.00,   0.00,  -0.11,
23482            -3.71,   5.07,   0.00,   0.00,   0.11,   4.14,   4.40,   0.00,
23483             0.00,   0.10,  -6.01,  -0.50,  -0.04,   0.00,   0.00,   0.13,
23484            -4.04,   4.39,   0.00,   0.00,   0.10,   3.45,  -4.72,   0.00,
23485             0.00,  -0.11,   3.31,   4.71,   0.00,   0.00,   0.11,   3.26,
23486            -4.50,   0.00,   0.00,  -0.10,  -3.26,  -4.50,   0.00,   0.00,
23487            -0.10,  -3.34,  -4.40,   0.00,   0.00,  -0.10,  -3.74,  -4.00,
23488             3.70,   4.00,   3.34,  -4.30,   3.30,  -4.30,  -3.66,   3.90,
23489             0.04,   3.66,   3.90,   0.04,  -3.62,  -3.90,  -3.61,   3.90,
23490            -0.20,   5.30,   0.00,   0.00,   0.12,   3.06,   4.30,   3.30,
23491 
23492        /* 1620-1747 */
23493             4.00,   0.40,   0.20,   3.10,   4.10,  -3.06,   3.90,  -3.30,
23494            -3.60,  -3.30,   3.36,   0.01,   3.14,   3.40,  -4.57,  -0.20,
23495             0.00,   0.00,   0.00,   0.10,  -2.70,  -3.60,   2.94,  -3.20,
23496            -2.90,   3.20,   2.47,  -3.40,   2.55,  -3.30,   2.80,  -3.08,
23497             2.51,   3.30,  -4.10,   0.30,  -0.12,  -0.10,   4.10,   0.20,
23498            -2.74,   3.00,   2.46,   3.23,  -3.66,   1.20,  -0.20,   0.20,
23499             3.74,  -0.40,  -2.51,  -2.80,  -3.74,   2.27,  -2.90,   0.00,
23500             0.00,  -2.50,   2.70,  -2.51,   2.60,  -3.50,   0.20,   3.38,
23501            -2.22,  -2.50,   3.26,  -0.40,   1.95,  -2.60,   3.22,  -0.40,
23502            -0.04,  -1.79,  -2.60,   1.91,   2.50,   0.74,   3.05,  -0.04,
23503             0.08,   2.11,  -2.30,  -2.11,   2.20,  -1.87,  -2.40,   2.03,
23504            -2.20,  -2.03,   2.20,   2.98,   0.00,   0.00,   2.98,  -1.71,
23505             2.40,   2.94,  -0.10,  -0.12,   0.10,   1.67,   2.40,  -1.79,
23506             2.30,  -1.79,   2.20,  -1.67,   2.20,   1.79,  -2.00,   1.87,
23507            -1.90,   1.63,  -2.10,  -1.59,   2.10,   1.55,  -2.10,  -1.55,
23508             2.10,  -2.59,  -0.20,  -1.75,  -1.90,  -1.75,   1.90,  -1.83,
23509 
23510        /* 1748-1875 */
23511            -1.80,   1.51,   2.00,  -1.51,  -2.00,   1.71,   1.80,   1.31,
23512             2.10,  -1.43,   2.00,   1.43,   2.00,  -2.43,  -1.51,   1.90,
23513            -1.47,   1.90,   2.39,   0.20,  -2.39,   1.39,   1.90,   1.39,
23514            -1.80,   1.47,  -1.60,   1.47,  -1.60,   1.43,  -1.50,  -1.31,
23515             1.60,   1.27,  -1.60,  -1.27,   1.60,   1.27,  -1.60,   2.03,
23516             1.35,   1.50,  -1.39,  -1.40,   1.95,  -0.20,  -1.27,   1.49,
23517             1.19,   1.50,   1.27,   1.40,   1.15,   1.50,   1.87,  -0.10,
23518            -1.12,  -1.50,   1.87,  -1.11,  -1.50,  -1.11,  -1.50,   0.00,
23519             0.00,   1.19,   1.40,   1.27,  -1.30,  -1.27,  -1.30,  -1.15,
23520             1.40,  -1.23,   1.30,  -1.23,  -1.30,   1.22,  -1.29,   1.07,
23521            -1.40,   1.75,  -0.20,  -1.03,  -1.40,  -1.07,   1.20,  -1.03,
23522             1.15,   1.07,   1.10,   1.51,  -1.03,   1.10,   1.03,  -1.10,
23523             0.00,   0.00,  -1.03,  -1.10,   0.91,  -1.20,  -0.88,  -1.20,
23524            -0.88,   1.20,  -0.95,   1.10,  -0.95,  -1.10,   1.43,  -1.39,
23525             0.95,  -1.00,  -0.95,   1.00,  -0.80,   1.10,   0.91,  -1.00,
23526            -1.35,   0.88,   1.00,  -0.83,   1.00,  -0.91,   0.90,   0.91,
23527 
23528        /* 1876-2003 */
23529             0.90,   0.88,  -0.90,  -0.76,  -1.00,  -0.76,   1.00,   0.76,
23530             1.00,  -0.72,   1.00,   0.84,  -0.90,   0.84,   0.90,   1.23,
23531             0.00,   0.00,  -0.52,  -1.10,  -0.68,   1.00,   1.19,  -0.20,
23532             1.19,   0.76,   0.90,   1.15,  -0.10,   1.15,  -0.10,   0.72,
23533            -0.90,  -1.15,  -1.15,   0.68,   0.90,  -0.68,   0.90,  -1.11,
23534             0.00,   0.00,   0.20,   0.79,   0.80,  -1.11,  -0.10,   0.00,
23535             0.00,  -0.48,  -1.00,  -0.76,  -0.80,  -0.72,  -0.80,  -1.07,
23536            -0.10,   0.64,   0.80,  -0.64,  -0.80,   0.64,   0.80,   0.40,
23537             0.60,   0.52,  -0.50,  -0.60,  -0.80,  -0.71,   0.70,  -0.99,
23538             0.99,   0.56,   0.80,  -0.56,   0.80,   0.68,  -0.70,   0.68,
23539             0.70,  -0.95,  -0.64,   0.70,   0.64,   0.70,  -0.60,   0.70,
23540            -0.60,  -0.70,  -0.91,  -0.10,  -0.51,   0.76,  -0.91,  -0.56,
23541             0.70,   0.88,   0.88,  -0.63,  -0.60,   0.55,  -0.60,  -0.80,
23542             0.80,  -0.80,  -0.52,   0.60,   0.52,   0.60,   0.52,  -0.60,
23543            -0.48,   0.60,   0.48,   0.60,   0.48,   0.60,  -0.76,   0.44,
23544            -0.60,   0.52,  -0.50,  -0.52,   0.50,   0.40,   0.60,  -0.40,
23545 
23546        /* 2004-2131 */
23547            -0.60,   0.40,  -0.60,   0.72,  -0.72,  -0.51,  -0.50,  -0.48,
23548             0.50,   0.48,  -0.50,  -0.48,   0.50,  -0.48,   0.50,   0.48,
23549            -0.50,  -0.48,  -0.50,  -0.68,  -0.68,   0.44,   0.50,  -0.64,
23550            -0.10,  -0.64,  -0.10,  -0.40,   0.50,   0.40,   0.50,   0.40,
23551             0.50,   0.00,   0.00,  -0.40,  -0.50,  -0.36,  -0.50,   0.36,
23552            -0.50,   0.60,  -0.60,   0.40,  -0.40,   0.40,   0.40,  -0.40,
23553             0.40,  -0.40,   0.40,  -0.56,  -0.56,   0.36,  -0.40,  -0.36,
23554             0.40,   0.36,  -0.40,  -0.36,  -0.40,   0.36,   0.40,   0.36,
23555             0.40,  -0.52,   0.52,   0.52,   0.32,   0.40,  -0.32,   0.40,
23556            -0.32,   0.40,  -0.32,   0.40,   0.32,  -0.40,  -0.32,  -0.40,
23557             0.32,  -0.40,   0.28,  -0.40,  -0.28,   0.40,   0.28,  -0.40,
23558             0.28,   0.40,   0.48,  -0.48,   0.48,   0.36,  -0.30,  -0.36,
23559            -0.30,   0.00,   0.00,   0.20,   0.40,  -0.44,   0.44,  -0.44,
23560            -0.44,  -0.44,  -0.44,   0.32,  -0.30,   0.32,   0.30,   0.24,
23561             0.30,  -0.12,  -0.10,  -0.28,   0.30,   0.28,   0.30,   0.28,
23562             0.30,   0.28,  -0.30,   0.28,  -0.30,   0.28,  -0.30,   0.28,
23563 
23564        /* 2132-2259 */
23565             0.30,  -0.28,   0.30,   0.40,   0.40,  -0.24,   0.30,   0.24,
23566            -0.30,   0.24,  -0.30,  -0.24,  -0.30,   0.24,   0.30,   0.24,
23567            -0.30,  -0.24,   0.30,   0.24,  -0.30,  -0.24,  -0.30,   0.24,
23568            -0.30,   0.24,   0.30,  -0.24,   0.30,  -0.24,   0.30,   0.20,
23569            -0.30,   0.20,  -0.30,   0.20,  -0.30,   0.20,   0.30,   0.20,
23570            -0.30,   0.20,  -0.30,   0.20,   0.30,   0.20,   0.30,  -0.20,
23571            -0.30,   0.20,  -0.30,   0.20,  -0.30,  -0.36,  -0.36,  -0.36,
23572            -0.04,   0.30,   0.12,  -0.10,  -0.32,  -0.24,   0.20,   0.24,
23573             0.20,   0.20,  -0.20,  -0.20,  -0.20,  -0.20,  -0.20,   0.20,
23574             0.20,   0.20,  -0.20,   0.20,   0.20,   0.20,   0.20,  -0.20,
23575            -0.20,   0.00,   0.00,  -0.20,  -0.20,  -0.20,   0.20,  -0.20,
23576             0.20,   0.20,  -0.20,  -0.20,  -0.20,   0.20,   0.20,   0.20,
23577             0.20,   0.20,  -0.20,   0.20,  -0.20,   0.28,   0.28,   0.28,
23578             0.28,   0.28,   0.28,  -0.28,   0.28,   0.12,   0.00,   0.24,
23579             0.16,  -0.20,   0.16,  -0.20,   0.16,  -0.20,   0.16,   0.20,
23580            -0.16,   0.20,   0.16,   0.20,  -0.16,   0.20,  -0.16,   0.20,
23581 
23582        /* 2260-2387 */
23583            -0.16,   0.20,   0.16,  -0.20,   0.16,   0.20,   0.16,  -0.20,
23584            -0.16,   0.20,  -0.16,  -0.20,  -0.16,   0.20,   0.16,   0.20,
23585             0.16,  -0.20,   0.16,  -0.20,   0.16,   0.20,   0.16,   0.20,
23586             0.16,   0.20,  -0.16,  -0.20,   0.16,   0.20,  -0.16,   0.20,
23587             0.16,   0.20,  -0.16,  -0.20,   0.16,  -0.20,   0.16,  -0.20,
23588            -0.16,  -0.20,   0.24,  -0.24,  -0.24,   0.24,   0.24,   0.12,
23589             0.20,   0.12,   0.20,  -0.12,  -0.20,   0.12,  -0.20,   0.12,
23590            -0.20,  -0.12,   0.20,  -0.12,   0.20,  -0.12,  -0.20,   0.12,
23591             0.20,   0.12,   0.20,   0.12,  -0.20,  -0.12,   0.20,   0.12,
23592            -0.20,  -0.12,   0.20,   0.12,   0.20,   0.00,   0.00,  -0.12,
23593             0.20,  -0.12,   0.20,   0.12,  -0.20,  -0.12,   0.20,   0.12,
23594             0.20,   0.00,  -0.21,  -0.20,   0.00,   0.00,   0.20,  -0.20,
23595            -0.20,  -0.20,   0.20,  -0.16,  -0.10,   0.00,   0.17,   0.16,
23596             0.16,   0.16,   0.16,  -0.16,   0.16,   0.16,  -0.16,   0.16,
23597            -0.16,   0.16,   0.12,   0.10,   0.12,  -0.10,  -0.12,   0.10,
23598            -0.12,   0.10,   0.12,  -0.10,  -0.12,   0.12,  -0.12,   0.12,
23599 
23600        /* 2388-2515 */
23601            -0.12,   0.12,  -0.12,  -0.12,  -0.12,  -0.12,  -0.12,  -0.12,
23602            -0.12,   0.12,   0.12,   0.12,   0.12,  -0.12,  -0.12,   0.12,
23603             0.12,   0.12,  -0.12,   0.12,  -0.12,  -0.12,  -0.12,   0.12,
23604            -0.12,  -0.12,   0.12,   0.00,   0.11,   0.11,-122.67, 164.70,
23605           203.78, 273.50,   3.58,   2.74,   6.18,  -4.56,   0.00,  -0.04,
23606             0.00,  -0.07,  57.44, -77.10,  95.82, 128.60,  -1.77,  -1.28,
23607             2.85,  -2.14,  82.14,  89.50,   0.00,   0.00,   2.00,  -1.84,
23608            -0.04,  47.73, -64.10,  23.79,  31.90,  -1.45,  -1.07,   0.69,
23609            -0.53, -46.38,  50.50,   0.00,   0.00,   1.13,   1.04,   0.02,
23610           -18.38,   0.00,  63.80,   0.00,   0.00,   0.41,   0.00,  -1.43,
23611            59.07,   0.00,   0.00,   0.00,   0.00,  -1.32,  57.28,   0.00,
23612             0.00,   0.00,   0.00,  -1.28, -48.65,   0.00,  -1.15,   0.00,
23613             0.00,   1.09,   0.00,   0.03, -18.30,  24.60, -17.30, -23.20,
23614             0.56,   0.41,  -0.51,   0.39, -16.91,  26.90,   8.43,  13.30,
23615             0.60,   0.38,   0.31,  -0.19,   1.23,  -1.70, -19.13, -25.70,
23616            -0.03,  -0.03,  -0.58,   0.43,  -0.72,   0.90, -17.34, -23.30,
23617 
23618        /* 2516-2643 */
23619             0.03,   0.02,  -0.52,   0.39, -19.49, -21.30,   0.00,   0.00,
23620            -0.48,   0.44,   0.01,  20.57, -20.10,   0.64,   0.70,  -0.45,
23621            -0.46,   0.00,  -0.01,   4.89,   5.90, -16.55,  19.90,   0.14,
23622            -0.11,   0.44,   0.37,  18.22,  19.80,   0.00,   0.00,   0.44,
23623            -0.41,  -0.01,   4.89,  -5.30, -16.51, -18.00,  -0.11,  -0.11,
23624            -0.41,   0.37, -17.86,   0.00,  17.10,   0.00,   0.00,   0.40,
23625             0.00,  -0.38,   0.32,   0.00,  24.42,   0.00,   0.00,  -0.01,
23626             0.00,  -0.55, -23.79,   0.00,   0.00,   0.00,   0.00,   0.53,
23627            14.72, -16.00,  -0.32,   0.00,  -0.36,  -0.33,  -0.01,   0.01,
23628             3.34,  -4.50,  11.86,  15.90,  -0.11,  -0.07,   0.35,  -0.27,
23629            -3.26,   4.40,  11.62,  15.60,   0.09,   0.07,   0.35,  -0.26,
23630           -19.53,   0.00,   5.09,   0.00,   0.00,   0.44,   0.00,  -0.11,
23631           -13.48,  14.70,   0.00,   0.00,   0.33,   0.30,   0.01,  10.86,
23632           -14.60,   3.18,   4.30,  -0.33,  -0.24,   0.09,  -0.07, -11.30,
23633           -15.10,   0.00,   0.00,  -0.34,   0.25,   0.01,   2.03,  -2.70,
23634            10.82,  14.50,  -0.07,  -0.05,   0.32,  -0.24,  17.46,   0.00,
23635 
23636        /* 2644-2771 */
23637             0.00,   0.00,   0.00,  -0.39,  16.43,   0.00,   0.52,   0.00,
23638             0.00,  -0.37,   0.00,  -0.01,   9.35,   0.00,  13.29,   0.00,
23639             0.00,  -0.21,   0.00,  -0.30, -10.42,  11.40,   0.00,   0.00,
23640             0.25,   0.23,   0.01,   0.44,   0.50, -10.38,  11.30,   0.02,
23641            -0.01,   0.25,   0.23, -14.64,   0.00,   0.00,   0.00,   0.00,
23642             0.33,   0.56,   0.80,  -8.67,  11.70,   0.02,  -0.01,   0.26,
23643             0.19,  13.88,   0.00,  -2.47,   0.00,   0.00,  -0.31,   0.00,
23644             0.06,  -1.99,   2.70,   7.72,  10.30,   0.06,   0.04,   0.23,
23645            -0.17,  -0.20,   0.00,  13.05,   0.00,   0.00,   0.00,   0.00,
23646            -0.29,   6.92,  -9.30,   3.34,   4.50,  -0.21,  -0.15,   0.10,
23647            -0.07,  -6.60,   0.00,  10.70,   0.00,   0.00,   0.15,   0.00,
23648            -0.24,  -8.04,  -8.70,   0.00,   0.00,  -0.19,   0.18, -10.58,
23649             0.00,  -3.10,   0.00,   0.00,   0.24,   0.00,   0.07,  -7.32,
23650             8.00,  -0.12,  -0.10,   0.18,   0.16,   1.63,   1.70,   6.96,
23651            -7.60,   0.03,  -0.04,  -0.17,  -0.16,  -3.62,   0.00,   9.86,
23652             0.00,   0.00,   0.08,   0.00,  -0.22,   0.20,  -0.20,  -6.88,
23653 
23654        /* 2772-2899 */
23655            -7.50,   0.00,   0.00,  -0.17,   0.15,  -8.99,   0.00,   4.02,
23656             0.00,   0.00,   0.20,   0.00,  -0.09,  -1.07,   1.40,  -5.69,
23657            -7.70,   0.03,   0.02,  -0.17,   0.13,   6.48,  -7.20,  -0.48,
23658            -0.50,  -0.16,  -0.14,  -0.01,   0.01,   5.57,  -7.50,   1.07,
23659             1.40,  -0.17,  -0.12,   0.03,  -0.02,   8.71,   0.00,   3.54,
23660             0.00,   0.00,  -0.19,   0.00,  -0.08,   0.40,   0.00,   9.27,
23661             0.00,   0.00,  -0.01,   0.00,  -0.21,  -6.13,   6.70,  -1.19,
23662            -1.30,   0.15,   0.14,  -0.03,   0.03,   5.21,  -5.70,  -2.51,
23663            -2.60,  -0.13,  -0.12,  -0.06,   0.06,   5.69,  -6.20,  -0.12,
23664            -0.10,  -0.14,  -0.13,  -0.01,   2.03,  -2.70,   4.53,   6.10,
23665            -0.06,  -0.05,   0.14,  -0.10,   5.01,   5.50,  -2.51,   2.70,
23666             0.12,  -0.11,   0.06,   0.06,  -1.91,   2.60,  -4.38,  -5.90,
23667             0.06,   0.04,  -0.13,   0.10,   4.65,  -6.30,   0.00,   0.00,
23668            -0.14,  -0.10,  -5.29,   5.70,   0.00,   0.00,   0.13,   0.12,
23669            -2.23,  -4.00,  -4.65,   4.20,  -0.09,   0.05,   0.10,   0.10,
23670            -4.53,   6.10,   0.00,   0.00,   0.14,   0.10,   2.47,   2.70,
23671 
23672        /* 2900-3027 */
23673            -4.46,   4.90,   0.06,  -0.06,   0.11,   0.10,  -5.05,   5.50,
23674             0.84,   0.90,   0.12,   0.11,   0.02,  -0.02,   4.97,  -5.40,
23675            -1.71,   0.00,  -0.12,  -0.11,   0.00,   0.04,  -0.99,  -1.30,
23676             4.22,  -5.70,  -0.03,   0.02,  -0.13,  -0.09,   0.99,   1.40,
23677             4.22,  -5.60,   0.03,  -0.02,  -0.13,  -0.09,  -4.69,  -5.20,
23678             0.00,   0.00,  -0.12,   0.10,  -3.42,   0.00,   6.09,   0.00,
23679             0.00,   0.08,   0.00,  -0.14,  -4.65,  -5.10,   0.00,   0.00,
23680            -0.11,   0.10,   0.00,   0.00,  -4.53,  -5.00,   0.00,   0.00,
23681            -0.11,   0.10,  -2.43,  -2.70,  -3.82,   4.20,  -0.06,   0.05,
23682             0.10,   0.09,   0.00,   0.00,  -4.53,   4.90,   0.00,   0.00,
23683             0.11,   0.10,  -4.49,  -4.90,   0.00,   0.00,  -0.11,   0.10,
23684             2.67,  -2.90,  -3.62,  -3.90,  -0.06,  -0.06,  -0.09,   0.08,
23685             3.94,  -5.30,   0.00,   0.00,  -0.12,  -3.38,   3.70,  -2.78,
23686            -3.10,   0.08,   0.08,  -0.07,   0.06,   3.18,  -3.50,  -2.82,
23687            -3.10,  -0.08,  -0.07,  -0.07,   0.06,  -5.77,   0.00,   1.87,
23688             0.00,   0.00,   0.13,   0.00,  -0.04,   3.54,  -4.80,  -0.64,
23689 
23690        /* 3028-3155 */
23691            -0.90,  -0.11,   0.00,  -0.02,  -3.50,  -4.70,   0.68,  -0.90,
23692            -0.11,   0.00,  -0.02,   5.49,   0.00,   0.00,   0.00,   0.00,
23693            -0.12,   1.83,  -2.50,   2.63,   3.50,  -0.06,   0.00,   0.08,
23694             3.02,  -4.10,   0.68,   0.90,  -0.09,   0.00,   0.02,   0.00,
23695             0.00,   5.21,   0.00,   0.00,   0.00,   0.00,  -0.12,  -3.54,
23696             3.80,   2.70,   3.60,  -1.35,   1.80,   0.08,   0.00,   0.04,
23697            -2.90,   3.90,   0.68,   0.90,   0.09,   0.00,   0.02,   0.80,
23698            -1.10,  -2.78,  -3.70,  -0.02,   0.00,  -0.08,   4.10,   0.00,
23699            -2.39,   0.00,   0.00,  -0.09,   0.00,   0.05,  -1.59,   2.10,
23700             2.27,   3.00,   0.05,   0.00,   0.07,  -2.63,   3.50,  -0.48,
23701            -0.60,  -2.94,  -3.20,  -2.94,   3.20,   2.27,  -3.00,  -1.11,
23702            -1.50,  -0.07,   0.00,  -0.03,  -0.56,  -0.80,  -2.35,   3.10,
23703             0.00,  -0.60,  -3.42,   1.90,  -0.12,  -0.10,   2.63,  -2.90,
23704             2.51,   2.80,  -0.64,   0.70,  -0.48,  -0.60,   2.19,  -2.90,
23705             0.24,  -0.30,   2.15,   2.90,   2.15,  -2.90,   0.52,   0.70,
23706             2.07,  -2.80,  -3.10,   0.00,   1.79,   0.00,   0.00,   0.07,
23707 
23708        /* 3156-3283 */
23709             0.00,  -0.04,   0.88,   0.00,  -3.46,   2.11,   2.80,  -0.36,
23710             0.50,   3.54,  -0.20,  -3.50,  -1.39,   1.50,  -1.91,  -2.10,
23711            -1.47,   2.00,   1.39,   1.90,   2.07,  -2.30,   0.91,   1.00,
23712             1.99,  -2.70,   3.30,   0.00,   0.60,  -0.44,  -0.70,  -1.95,
23713             2.60,   2.15,  -2.40,  -0.60,  -0.70,   3.30,   0.84,   0.00,
23714            -3.10,  -3.10,   0.00,  -0.72,  -0.32,   0.40,  -1.87,  -2.50,
23715             1.87,  -2.50,   0.32,   0.40,  -0.24,   0.30,  -1.87,  -2.50,
23716            -0.24,  -0.30,   1.87,  -2.50,  -2.70,   0.00,   1.55,   2.03,
23717             2.20,  -2.98,  -1.99,  -2.20,   0.12,  -0.10,  -0.40,   0.50,
23718             1.59,   2.10,   0.00,   0.00,  -1.79,   2.00,  -1.03,   1.40,
23719            -1.15,  -1.60,   0.32,   0.50,   1.39,  -1.90,   2.35,  -1.27,
23720             1.70,   0.60,   0.80,  -0.32,  -0.40,   1.35,  -1.80,   0.44,
23721             0.00,   2.23,  -0.84,   0.90,  -1.27,  -1.40,  -1.47,   1.60,
23722            -0.28,  -0.30,  -0.28,   0.40,  -1.27,  -1.70,   0.28,  -0.40,
23723            -1.43,  -1.50,   0.00,   0.00,  -1.27,  -1.70,   2.11,  -0.32,
23724            -0.40,  -1.23,   1.60,   1.19,  -1.30,  -0.72,  -0.80,   0.72,
23725 
23726        /* 3284-3411 */
23727            -0.80,  -1.15,  -1.30,  -1.35,  -1.50,  -1.19,  -1.60,  -0.12,
23728             0.20,   1.79,   0.00,  -0.88,  -0.28,   0.40,   1.11,   1.50,
23729            -1.83,   0.00,   0.56,  -0.12,   0.10,  -1.27,  -1.40,   0.00,
23730             0.00,   1.15,   1.50,  -0.12,   0.20,   1.11,   1.50,   0.36,
23731            -0.50,  -1.07,  -1.40,  -1.11,   1.50,   1.67,   0.00,   0.80,
23732            -1.11,   0.00,   1.43,   1.23,  -1.30,  -0.24,  -1.19,  -1.30,
23733            -0.24,   0.20,  -0.44,  -0.90,  -0.95,   1.10,   1.07,  -1.40,
23734             1.15,  -1.30,   1.03,  -1.10,  -0.56,  -0.60,  -0.68,   0.90,
23735            -0.76,  -1.00,  -0.24,  -0.30,   0.95,  -1.30,   0.56,   0.70,
23736             0.84,  -1.10,  -0.56,   0.00,  -1.55,   0.91,  -1.30,   0.28,
23737             0.30,   0.16,  -0.20,   0.95,   1.30,   0.40,  -0.50,  -0.88,
23738            -1.20,   0.95,  -1.10,  -0.48,  -0.50,   0.00,   0.00,  -1.07,
23739             1.20,   0.44,  -0.50,   0.95,   1.10,   0.00,   0.00,   0.92,
23740            -1.30,   0.95,   1.00,  -0.52,   0.60,   1.59,   0.24,  -0.40,
23741             0.91,   1.20,   0.84,  -1.10,  -0.44,  -0.60,   0.84,   1.10,
23742            -0.44,   0.60,  -0.44,   0.60,  -0.84,  -1.10,  -0.80,   0.00,
23743 
23744        /* 3412-3539 */
23745             1.35,   0.76,   0.20,  -0.91,  -1.00,   0.20,  -0.30,  -0.91,
23746            -1.20,  -0.95,   1.00,  -0.48,  -0.50,   0.88,   1.00,   0.48,
23747            -0.50,  -0.95,  -1.10,   0.20,  -0.20,  -0.99,   1.10,  -0.84,
23748             1.10,  -0.24,  -0.30,   0.20,  -0.30,   0.84,   1.10,  -1.39,
23749             0.00,  -0.28,  -0.16,   0.20,   0.84,   1.10,   0.00,   0.00,
23750             1.39,   0.00,   0.00,  -0.95,   1.00,   1.35,  -0.99,   0.00,
23751             0.88,  -0.52,   0.00,  -1.19,   0.20,   0.20,   0.76,  -1.00,
23752             0.00,   0.00,   0.76,   1.00,   0.00,   0.00,   0.76,   1.00,
23753            -0.76,   1.00,   0.00,   0.00,   1.23,   0.76,   0.80,  -0.32,
23754             0.40,  -0.72,   0.80,  -0.40,  -0.40,   0.00,   0.00,  -0.80,
23755            -0.90,  -0.68,   0.90,  -0.16,  -0.20,  -0.16,  -0.20,   0.68,
23756            -0.90,  -0.36,   0.50,  -0.56,  -0.80,   0.72,  -0.90,   0.44,
23757            -0.60,  -0.48,  -0.70,  -0.16,   0.00,  -1.11,   0.32,   0.00,
23758            -1.07,   0.60,  -0.80,  -0.28,  -0.40,  -0.64,   0.00,   0.91,
23759             1.11,   0.64,  -0.90,   0.76,  -0.80,   0.00,   0.00,  -0.76,
23760            -0.80,   1.03,   0.00,  -0.36,  -0.64,  -0.70,   0.36,  -0.40,
23761 
23762        /* 3540-3667 */
23763             1.07,   0.36,  -0.50,  -0.52,  -0.70,   0.60,   0.00,   0.88,
23764             0.95,   0.00,   0.48,   0.16,  -0.20,   0.60,   0.80,   0.16,
23765            -0.20,  -0.60,  -0.80,   0.00,  -1.00,   0.12,   0.20,   0.16,
23766            -0.20,   0.68,   0.70,   0.59,  -0.80,  -0.99,  -0.56,  -0.60,
23767             0.36,  -0.40,  -0.68,  -0.70,  -0.68,  -0.70,  -0.36,  -0.50,
23768            -0.44,   0.60,   0.64,   0.70,  -0.12,   0.10,  -0.52,   0.60,
23769             0.36,   0.40,   0.00,   0.00,   0.95,  -0.84,   0.00,   0.44,
23770             0.56,   0.60,   0.32,  -0.30,   0.00,   0.00,   0.60,   0.70,
23771             0.00,   0.00,   0.60,   0.70,  -0.12,  -0.20,   0.52,  -0.70,
23772             0.00,   0.00,   0.56,   0.70,  -0.12,   0.10,  -0.52,  -0.70,
23773             0.00,   0.00,   0.88,  -0.76,   0.00,  -0.44,   0.00,   0.00,
23774            -0.52,  -0.70,   0.52,  -0.70,   0.36,  -0.40,  -0.44,  -0.50,
23775             0.00,   0.00,   0.60,   0.60,   0.84,   0.00,   0.12,  -0.24,
23776             0.00,   0.80,  -0.56,   0.60,  -0.32,  -0.30,   0.48,  -0.50,
23777             0.28,  -0.30,  -0.48,  -0.50,   0.12,   0.20,   0.48,  -0.60,
23778             0.48,   0.60,  -0.12,   0.20,   0.24,   0.00,   0.76,  -0.52,
23779 
23780        /* 3668-3795 */
23781            -0.60,  -0.52,   0.60,   0.48,  -0.50,  -0.24,  -0.30,   0.12,
23782            -0.10,   0.48,   0.60,   0.52,  -0.20,   0.36,   0.40,  -0.44,
23783             0.50,  -0.24,  -0.30,  -0.48,  -0.60,  -0.44,  -0.60,  -0.12,
23784             0.10,   0.76,   0.76,   0.20,  -0.20,   0.48,   0.50,   0.40,
23785            -0.50,  -0.24,  -0.30,   0.44,  -0.60,   0.44,  -0.60,   0.36,
23786             0.00,  -0.64,   0.72,   0.00,  -0.12,   0.00,  -0.10,  -0.40,
23787            -0.60,  -0.20,  -0.20,  -0.44,   0.50,  -0.44,   0.50,   0.20,
23788             0.20,  -0.44,  -0.50,   0.20,  -0.20,  -0.20,   0.20,  -0.44,
23789            -0.50,   0.64,   0.00,   0.32,  -0.36,   0.50,  -0.20,  -0.30,
23790             0.12,  -0.10,   0.48,   0.50,  -0.12,   0.30,  -0.36,  -0.50,
23791             0.00,   0.00,   0.48,   0.50,  -0.48,   0.50,   0.68,   0.00,
23792            -0.12,   0.56,  -0.40,   0.44,  -0.50,  -0.12,  -0.10,   0.24,
23793             0.30,  -0.40,   0.40,   0.64,   0.00,  -0.24,   0.64,   0.00,
23794            -0.20,   0.00,   0.00,   0.44,  -0.50,   0.44,   0.50,  -0.12,
23795             0.20,  -0.36,  -0.50,   0.12,   0.00,   0.64,  -0.40,   0.50,
23796             0.00,   0.10,   0.00,   0.00,  -0.40,   0.50,   0.00,   0.00,
23797 
23798        /* 3796-3923 */
23799            -0.40,  -0.50,   0.56,   0.00,   0.28,   0.00,   0.10,   0.36,
23800             0.50,   0.00,  -0.10,   0.36,  -0.50,   0.36,   0.50,   0.00,
23801            -0.10,   0.24,  -0.20,  -0.36,  -0.40,   0.16,   0.20,   0.40,
23802            -0.40,   0.00,   0.00,  -0.36,  -0.50,  -0.36,  -0.50,  -0.32,
23803            -0.50,  -0.12,   0.10,   0.20,   0.20,  -0.36,   0.40,  -0.60,
23804             0.60,   0.28,   0.00,   0.52,   0.12,  -0.10,   0.40,   0.40,
23805             0.00,  -0.50,   0.20,  -0.20,  -0.32,   0.40,   0.16,   0.20,
23806            -0.16,   0.20,   0.32,   0.40,   0.56,   0.00,  -0.12,   0.32,
23807            -0.40,  -0.16,  -0.20,   0.00,   0.00,   0.40,   0.40,  -0.40,
23808            -0.40,  -0.40,   0.40,  -0.36,   0.40,   0.12,   0.10,   0.00,
23809             0.10,   0.36,   0.40,   0.00,  -0.10,   0.36,   0.40,  -0.36,
23810             0.40,   0.00,   0.10,   0.32,   0.00,   0.44,   0.12,   0.20,
23811             0.28,  -0.40,   0.00,   0.00,   0.36,   0.40,   0.32,  -0.40,
23812            -0.16,   0.12,   0.10,   0.32,  -0.40,   0.20,   0.30,  -0.24,
23813             0.30,   0.00,   0.10,   0.32,   0.40,   0.00,  -0.10,  -0.32,
23814            -0.40,  -0.32,   0.40,   0.00,   0.10,  -0.52,  -0.52,   0.52,
23815 
23816        /* 3924-4051 */
23817             0.32,  -0.40,   0.00,   0.00,   0.32,   0.40,   0.32,  -0.40,
23818             0.00,   0.00,  -0.32,  -0.40,  -0.32,   0.40,   0.32,   0.40,
23819             0.00,   0.00,   0.32,   0.40,   0.00,   0.00,  -0.32,  -0.40,
23820             0.00,   0.00,   0.32,   0.40,   0.16,   0.20,   0.32,  -0.30,
23821            -0.16,   0.00,  -0.48,  -0.20,   0.20,  -0.28,  -0.30,   0.28,
23822            -0.40,   0.00,   0.00,   0.28,  -0.40,   0.00,   0.00,   0.28,
23823            -0.40,   0.00,   0.00,  -0.28,  -0.40,   0.28,   0.40,  -0.28,
23824            -0.40,  -0.48,  -0.20,   0.20,   0.24,   0.30,   0.44,   0.00,
23825             0.16,   0.24,   0.30,   0.16,  -0.20,   0.24,   0.30,  -0.12,
23826             0.20,   0.20,   0.30,  -0.16,   0.20,   0.00,   0.00,   0.44,
23827            -0.32,   0.30,   0.24,   0.00,  -0.36,   0.36,   0.00,   0.24,
23828             0.12,  -0.20,   0.20,   0.30,  -0.12,   0.00,  -0.28,   0.30,
23829            -0.24,   0.30,   0.12,   0.10,  -0.28,  -0.30,  -0.28,   0.30,
23830             0.00,   0.00,  -0.28,  -0.30,   0.00,   0.00,  -0.28,  -0.30,
23831             0.00,   0.00,   0.28,   0.30,   0.00,   0.00,  -0.28,  -0.30,
23832            -0.28,   0.30,   0.00,   0.00,  -0.28,  -0.30,   0.00,   0.00,
23833 
23834        /* 4052-4179 */
23835             0.28,   0.30,   0.00,   0.00,  -0.28,   0.30,   0.28,  -0.30,
23836            -0.28,   0.30,   0.40,   0.40,  -0.24,   0.30,   0.00,  -0.10,
23837             0.16,   0.00,   0.36,  -0.20,   0.30,  -0.12,  -0.10,  -0.24,
23838            -0.30,   0.00,   0.00,  -0.24,   0.30,  -0.24,   0.30,   0.00,
23839             0.00,  -0.24,   0.30,  -0.24,   0.30,   0.24,  -0.30,   0.00,
23840             0.00,   0.24,  -0.30,   0.00,   0.00,   0.24,   0.30,   0.24,
23841            -0.30,   0.24,   0.30,  -0.24,   0.30,  -0.24,   0.30,  -0.20,
23842             0.20,  -0.16,  -0.20,   0.00,   0.00,  -0.32,   0.20,   0.00,
23843             0.10,   0.20,  -0.30,   0.20,  -0.20,   0.12,   0.20,  -0.16,
23844             0.20,   0.16,   0.20,   0.20,   0.30,   0.20,   0.30,   0.00,
23845             0.00,  -0.20,   0.30,   0.00,   0.00,   0.20,   0.30,  -0.20,
23846            -0.30,  -0.20,  -0.30,   0.20,  -0.30,   0.00,   0.00,   0.20,
23847             0.30,   0.00,   0.00,   0.20,   0.30,   0.00,   0.00,   0.20,
23848             0.30,   0.00,   0.00,   0.20,   0.30,   0.00,   0.00,   0.20,
23849            -0.30,   0.00,   0.00,  -0.20,  -0.30,   0.00,   0.00,  -0.20,
23850             0.30,   0.00,   0.00,  -0.20,   0.30,   0.00,   0.00,   0.36,
23851 
23852        /* 4180-4307 */
23853             0.00,   0.00,   0.36,   0.12,   0.10,  -0.24,   0.20,   0.12,
23854            -0.20,  -0.16,  -0.20,  -0.13,   0.10,   0.22,   0.21,   0.20,
23855             0.00,  -0.28,   0.32,   0.00,  -0.12,  -0.20,  -0.20,   0.12,
23856            -0.10,   0.12,   0.10,  -0.20,   0.20,   0.00,   0.00,  -0.32,
23857             0.32,   0.00,   0.00,   0.32,   0.32,   0.00,   0.00,  -0.24,
23858            -0.20,   0.24,   0.20,   0.20,   0.00,  -0.24,   0.00,   0.00,
23859            -0.24,  -0.20,   0.00,   0.00,   0.24,   0.20,  -0.24,  -0.20,
23860             0.00,   0.00,  -0.24,   0.20,   0.16,  -0.20,   0.12,   0.10,
23861             0.20,   0.20,   0.00,  -0.10,  -0.12,   0.10,  -0.16,  -0.20,
23862            -0.12,  -0.10,  -0.16,   0.20,   0.20,   0.20,   0.00,   0.00,
23863            -0.20,   0.20,  -0.20,   0.20,  -0.20,   0.20,  -0.20,   0.20,
23864             0.20,  -0.20,  -0.20,  -0.20,   0.00,   0.00,  -0.20,   0.20,
23865             0.20,   0.00,  -0.20,   0.00,   0.00,  -0.20,   0.20,  -0.20,
23866             0.20,  -0.20,  -0.20,  -0.20,  -0.20,   0.00,   0.00,   0.20,
23867             0.20,   0.20,   0.20,   0.12,  -0.20,  -0.12,  -0.10,   0.28,
23868            -0.28,   0.16,  -0.20,   0.00,  -0.10,   0.00,   0.10,  -0.16,
23869 
23870        /* 4308-4435 */
23871             0.20,   0.00,  -0.10,  -0.16,  -0.20,   0.00,  -0.10,   0.16,
23872            -0.20,   0.16,  -0.20,   0.00,   0.00,   0.16,   0.20,  -0.16,
23873             0.20,   0.00,   0.00,   0.16,   0.20,   0.16,  -0.20,   0.16,
23874            -0.20,  -0.16,   0.20,   0.16,  -0.20,   0.00,   0.00,   0.16,
23875             0.20,   0.00,   0.00,   0.16,   0.20,   0.00,   0.00,  -0.16,
23876            -0.20,   0.16,  -0.20,  -0.16,  -0.20,   0.00,   0.00,  -0.16,
23877            -0.20,   0.00,   0.00,  -0.16,   0.20,   0.00,   0.00,   0.16,
23878            -0.20,   0.16,   0.20,   0.16,   0.20,   0.00,   0.00,  -0.16,
23879            -0.20,   0.00,   0.00,  -0.16,  -0.20,   0.00,   0.00,   0.16,
23880             0.20,   0.16,   0.20,   0.00,   0.00,   0.16,   0.20,   0.16,
23881            -0.20,   0.16,   0.20,   0.00,   0.00,  -0.16,   0.20,   0.00,
23882             0.10,   0.12,  -0.20,   0.12,  -0.20,   0.00,  -0.10,   0.00,
23883            -0.10,   0.12,   0.20,   0.00,  -0.10,  -0.12,   0.20,  -0.15,
23884             0.20,  -0.24,   0.24,   0.00,   0.00,   0.24,   0.24,   0.12,
23885            -0.20,  -0.12,  -0.20,   0.00,   0.00,   0.12,   0.20,   0.12,
23886            -0.20,   0.12,   0.20,   0.12,   0.20,   0.12,   0.20,   0.12,
23887 
23888        /* 4436-4563 */
23889            -0.20,  -0.12,   0.20,   0.00,   0.00,   0.12,   0.20,   0.12,
23890             0.00,  -0.20,   0.00,   0.00,  -0.12,  -0.20,   0.12,  -0.20,
23891             0.00,   0.00,   0.12,   0.20,  -0.12,   0.20,  -0.12,   0.20,
23892             0.12,  -0.20,   0.00,   0.00,   0.12,   0.20,   0.20,   0.00,
23893             0.12,   0.00,   0.00,  -0.12,   0.20,   0.00,   0.00,  -0.12,
23894            -0.20,   0.00,   0.00,  -0.12,  -0.20,  -0.12,  -0.20,   0.00,
23895             0.00,   0.12,  -0.20,   0.12,  -0.20,   0.12,   0.20,  -0.12,
23896            -0.20,   0.00,   0.00,   0.12,  -0.20,   0.12,  -0.20,   0.12,
23897             0.20,   0.12,   0.00,   0.20,  -0.12,  -0.20,   0.00,   0.00,
23898             0.12,   0.20,  -0.16,   0.00,   0.16,  -0.20,   0.20,   0.00,
23899             0.00,  -0.20,   0.00,   0.00,  -0.20,   0.20,   0.00,   0.00,
23900             0.20,   0.20,  -0.20,   0.00,   0.00,  -0.20,   0.12,   0.00,
23901            -0.16,   0.20,   0.00,   0.00,   0.20,   0.12,  -0.10,   0.00,
23902             0.10,   0.16,  -0.16,  -0.16,  -0.16,  -0.16,  -0.16,   0.00,
23903             0.00,  -0.16,   0.00,   0.00,  -0.16,  -0.16,  -0.16,   0.00,
23904             0.00,  -0.16,   0.00,   0.00,   0.16,   0.00,   0.00,   0.16,
23905 
23906        /* 4564-4691 */
23907             0.00,   0.00,   0.16,   0.16,   0.00,   0.00,  -0.16,   0.00,
23908             0.00,  -0.16,  -0.16,   0.00,   0.00,   0.16,   0.00,   0.00,
23909            -0.16,  -0.16,   0.00,   0.00,  -0.16,  -0.16,   0.12,   0.10,
23910             0.12,  -0.10,   0.12,   0.10,   0.00,   0.00,   0.12,   0.10,
23911            -0.12,   0.10,   0.00,   0.00,   0.12,   0.10,   0.12,  -0.10,
23912             0.00,   0.00,  -0.12,  -0.10,   0.00,   0.00,   0.12,   0.10,
23913             0.12,   0.00,   0.00,   0.12,   0.00,   0.00,  -0.12,   0.00,
23914             0.00,   0.12,   0.12,   0.12,   0.12,   0.12,   0.00,   0.00,
23915             0.12,   0.00,   0.00,   0.12,   0.12,   0.00,   0.00,   0.12,
23916             0.00,   0.00,   0.12,  -0.12,  -0.12,   0.12,   0.12,  -0.12,
23917            -0.12,   0.00,   0.00,   0.12,  -0.12,   0.12,   0.12,  -0.12,
23918            -0.12,   0.00,   0.00,  -0.12,  -0.12,   0.00,   0.00,  -0.12,
23919             0.12,   0.00,   0.00,   0.12,   0.00,   0.00,   0.12,   0.00,
23920             0.00,   0.12,  -0.12,   0.00,   0.00,  -0.12,   0.12,  -0.12,
23921            -0.12,   0.12,   0.00,   0.00,   0.12,   0.12,   0.12,  -0.12,
23922             0.00,   0.00,  -0.12,  -0.12,  -0.12,   0.00,   0.00,  -0.12,
23923 
23924        /* 4692-NA */
23925            -0.12,   0.00,   0.00,   0.12,   0.12,   0.00,   0.00,  -0.12,
23926            -0.12,  -0.12,  -0.12,   0.12,   0.00,   0.00,   0.12,  -0.12,
23927             0.00,   0.00,  -0.12,  -0.12,   0.00,   0.00,   0.12,  -0.12,
23928            -0.12,  -0.12,  -0.12,   0.12,   0.12,  -0.12,  -0.12,   0.00,
23929             0.00,  -0.12,   0.00,   0.00,  -0.12,   0.12,   0.00,   0.00,
23930             0.12,   0.00,   0.00,  -0.12,  -0.12,   0.00,   0.00,  -0.12,
23931            -0.12,   0.12,   0.00,   0.00,   0.12,   0.12,   0.00,   0.00,
23932             0.12,   0.00,   0.00,   0.12,   0.12,   0.08,   0.00,   0.04
23933        };
23934 
23935     /* Number of amplitude coefficients */
23936         final int NA = a.length;
23937 
23938     /* Amplitude usage: X or Y, sin or cos, power of T. */
23939         final int jaxy[] = {0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1};
23940         final int jasc[] = {0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0};
23941         final int japt[] = {0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4};
23942 
23943     /* Miscellaneous */
23944        double t, w, pt[] = new double[MAXPT+1], fa[] = new double[14], xypr[] = new double[2], xypl[] = new double[2], xyls[] = new double[2], arg,
23945               sc[] = new double[2];
23946        int jpt, i, j, jxy, ialast, ifreq, m, ia, jsc;
23947 
23948     /*--------------------------------------------------------------------*/
23949 
23950     /* Interval between fundamental date J2000.0 and given date (JC). */
23951        t = ((date1 - DJ00) + date2) / DJC;
23952 
23953     /* Powers of T. */
23954        w = 1.0;
23955        for (jpt = 0; jpt <= MAXPT; jpt++) {
23956           pt[jpt] = w;
23957           w *= t;
23958        }
23959 
23960     /* Initialize totals in X and Y:  polynomial, luni-solar, planetary. */
23961        for (jxy = 0; jxy < 2; jxy++) {
23962           xypr[jxy] = 0.0;
23963           xyls[jxy] = 0.0;
23964           xypl[jxy] = 0.0;
23965        }
23966 
23967     /* --------------------------------- */
23968     /* Fundamental arguments (IERS 2003) */
23969     /* --------------------------------- */
23970 
23971     /* Mean anomaly of the Moon. */
23972        fa[0] = jauFal03(t);
23973 
23974     /* Mean anomaly of the Sun. */
23975        fa[1] = jauFalp03(t);
23976 
23977     /* Mean argument of the latitude of the Moon. */
23978        fa[2] = jauFaf03(t);
23979 
23980     /* Mean elongation of the Moon from the Sun. */
23981        fa[3] = jauFad03(t);
23982 
23983     /* Mean longitude of the ascending node of the Moon. */
23984        fa[4] = jauFaom03(t);
23985 
23986     /* Planetary longitudes, Mercury through Neptune. */
23987        fa[5] = jauFame03(t);
23988        fa[6] = jauFave03(t);
23989        fa[7] = jauFae03(t);
23990        fa[8] = jauFama03(t);
23991        fa[9] = jauFaju03(t);
23992        fa[10] = jauFasa03(t);
23993        fa[11] = jauFaur03(t);
23994        fa[12] = jauFane03(t);
23995 
23996     /* General accumulated precession in longitude. */
23997        fa[13] = jauFapa03(t);
23998 
23999     /* -------------------------------------- */
24000     /* Polynomial part of precession-nutation */
24001     /* -------------------------------------- */
24002 
24003        for (jxy = 0; jxy < 2; jxy++) {
24004           for (j = MAXPT; j >= 0; j--) {
24005              xypr[jxy] += xyp[jxy][j] * pt[j];
24006           }
24007        }
24008 
24009     /* ---------------------------------- */
24010     /* Nutation periodic terms, planetary */
24011     /* ---------------------------------- */
24012 
24013     /* Work backwards through the coefficients per frequency list. */
24014        ialast = NA;
24015        for (ifreq = NFPL-1; ifreq >= 0; ifreq--) {
24016 
24017        /* Obtain the argument functions. */
24018           arg = 0.0;
24019           for (i = 0; i < 14; i++) {
24020              m = mfapl[ifreq][i];
24021              if (m != 0) arg += (double)m * fa[i];
24022           }
24023           sc[0] = sin(arg);
24024           sc[1] = cos(arg);
24025 
24026        /* Work backwards through the amplitudes at this frequency. */
24027           ia = nc[ifreq+NFLS];
24028           for (i = ialast; i >= ia; i--) {
24029 
24030           /* Coefficient number (0 = 1st). */
24031              j = i-ia;
24032 
24033           /* X or Y. */
24034              jxy = jaxy[j];
24035 
24036           /* Sin or cos. */
24037              jsc = jasc[j];
24038 
24039           /* Power of T. */
24040              jpt = japt[j];
24041 
24042           /* Accumulate the component. */
24043              xypl[jxy] += a[i-1] * sc[jsc] * pt[jpt];
24044           }
24045           ialast = ia-1;
24046        }
24047 
24048     /* ----------------------------------- */
24049     /* Nutation periodic terms, luni-solar */
24050     /* ----------------------------------- */
24051 
24052     /* Continue working backwards through the number of coefficients list. */
24053        for (ifreq = NFLS-1; ifreq >= 0; ifreq--) {
24054 
24055        /* Obtain the argument functions. */
24056           arg = 0.0;
24057           for (i = 0; i < 5; i++) {
24058              m = mfals[ifreq][i];
24059              if (m != 0) arg += (double)m * fa[i];
24060           }
24061           sc[0] = sin(arg);
24062           sc[1] = cos(arg);
24063 
24064        /* Work backwards through the amplitudes at this frequency. */
24065           ia = nc[ifreq];
24066           for (i = ialast; i >= ia; i--) {
24067 
24068           /* Coefficient number (0 = 1st). */
24069              j = i-ia;
24070 
24071           /* X or Y. */
24072              jxy = jaxy[j];
24073 
24074           /* Sin or cos. */
24075              jsc = jasc[j];
24076 
24077           /* Power of T. */
24078              jpt = japt[j];
24079 
24080           /* Accumulate the component. */
24081              xyls[jxy] += a[i-1] * sc[jsc] * pt[jpt];
24082           }
24083           ialast = ia-1;
24084        }
24085 
24086     /* ------------------------------------ */
24087     /* Results:  CIP unit vector components */
24088     /* ------------------------------------ */
24089 
24090        double x = DAS2R * (xypr[0] + (xyls[0] + xypl[0]) / 1e6);
24091        double y = DAS2R * (xypr[1] + (xyls[1] + xypl[1]) / 1e6);
24092 
24093        return new CelestialIntermediatePole(x, y);
24094 
24095         }
24096     
24097 
24098     /**
24099     *  For a given TT date, compute the X,Y coordinates of the Celestial
24100     *  Intermediate Pole and the CIO locator s, using the IAU 2000A
24101     *  precession-nutation model.
24102     *
24103     *<p>This function is derived from the International Astronomical Union's
24104     *  SOFA (Standards Of Fundamental Astronomy) software collection.
24105     *
24106     *<p>Status:  support function.
24107     *
24108     *<!-- Given: -->
24109     *     @param date1 double TT as a 2-part Julian Date (Note 1)
24110     *     @param date2 double TT as a 2-part Julian Date (Note 1)
24111     *
24112     *<!-- Returned: -->
24113     *     @return x double     <u>returned</u> Celestial Intermediate Pole (Note 2)
24114     *             y double     <u>returned</u> Celestial Intermediate Pole (Note 2) 
24115     *             s double     <u>returned</u> the CIO locator s (Note 2)
24116     *
24117     * <p>Notes:
24118     * <ol>
24119     *
24120     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
24121     *     convenient way between the two arguments.  For example,
24122     *     JD(TT)=2450123.7 could be expressed in any of these ways,
24123     *     among others:
24124     *<pre>
24125     *            date1          date2
24126     *
24127     *         2450123.7           0.0       (JD method)
24128     *         2451545.0       -1421.3       (J2000 method)
24129     *         2400000.5       50123.2       (MJD method)
24130     *         2450123.5           0.2       (date &amp; time method)
24131     *</pre>
24132     *     The JD method is the most natural and convenient to use in
24133     *     cases where the loss of several decimal digits of resolution
24134     *     is acceptable.  The J2000 method is best matched to the way
24135     *     the argument is handled internally and will deliver the
24136     *     optimum resolution.  The MJD method and the date &amp; time methods
24137     *     are both good compromises between resolution and convenience.
24138     *
24139     * <li> The Celestial Intermediate Pole coordinates are the x,y
24140     *     components of the unit vector in the Geocentric Celestial
24141     *     Reference System.
24142     *
24143     * <li> The CIO locator s (in radians) positions the Celestial
24144     *     Intermediate Origin on the equator of the CIP.
24145     *
24146     * <li> A faster, but slightly less accurate result (about 1 mas for
24147     *     X,Y), can be obtained by using instead the jauXys00b function.
24148     *</ol>
24149     *<p>Called:<ul>
24150     *     <li>{@link #jauPnm00a} classical NPB matrix, IAU 2000A
24151     *     <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
24152     *     <li>{@link #jauS00} the CIO locator s, given X,Y, IAU 2000A
24153     * </ul>
24154     *<p>Reference:
24155     *
24156     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
24157     *     IERS Technical Note No. 32, BKG (2004)
24158     *
24159     *@version 2008 May 12
24160     *
24161     *  @since Release 20101201
24162     *
24163     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
24164     */
24165     public static ICRFrame jauXys00a(double date1, double date2)
24166     {
24167 
24168     /* Form the bias-precession-nutation matrix, IAU 2000A. */
24169        double rbpn[][] = jauPnm00a(date1, date2);
24170 
24171     /* Extract X,Y. */
24172        CelestialIntermediatePole cip = jauBpn2xy(rbpn);
24173 
24174     /* Obtain s. */
24175        double s = jauS00(date1, date2, cip.x, cip.y);
24176 
24177        return new ICRFrame(cip, s);
24178 
24179         }
24180     
24181 
24182     /**
24183      *    The Celestial Intermediate Pole coordinates are the x,y
24184     *     components of the unit vector in the Geocentric Celestial
24185     *     Reference System.
24186     *
24187     *  The CIO locator s (in radians) positions the Celestial
24188     *     Intermediate Origin on the equator of the CIP.
24189  
24190      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 1 Feb 2010
24191      * 
24192      * @since AIDA Stage 1
24193      */
24194     public static class ICRFrame {
24195         public CelestialIntermediatePole cip;
24196         public double s;
24197         public ICRFrame(CelestialIntermediatePole cip, double s) {
24198             this.cip = cip;
24199             this.s = s;
24200         }
24201     }
24202     /**
24203     *  For a given TT date, compute the X,Y coordinates of the Celestial
24204     *  Intermediate Pole and the CIO locator s, using the IAU 2000B
24205     *  precession-nutation model.
24206     *
24207     *<p>This function is derived from the International Astronomical Union's
24208     *  SOFA (Standards Of Fundamental Astronomy) software collection.
24209     *
24210     *<p>Status:  support function.
24211     *
24212     *<!-- Given: -->
24213     *     @param date1 double TT as a 2-part Julian Date (Note 1)
24214     *     @param date2 double TT as a 2-part Julian Date (Note 1)
24215     *
24216     *<!-- Returned: -->
24217     *     @return x double     <u>returned</u> Celestial Intermediate Pole (Note 2)
24218     *             y double     <u>returned</u> Celestial Intermediate Pole (Note 2) 
24219     *             s             double     <u>returned</u> the CIO locator s (Note 2)
24220     *
24221     * <p>Notes:
24222     * <ol>
24223     *
24224     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
24225     *     convenient way between the two arguments.  For example,
24226     *     JD(TT)=2450123.7 could be expressed in any of these ways,
24227     *     among others:
24228     *<pre>
24229     *            date1          date2
24230     *
24231     *         2450123.7           0.0       (JD method)
24232     *         2451545.0       -1421.3       (J2000 method)
24233     *         2400000.5       50123.2       (MJD method)
24234     *         2450123.5           0.2       (date &amp; time method)
24235     *</pre>
24236     *     The JD method is the most natural and convenient to use in
24237     *     cases where the loss of several decimal digits of resolution
24238     *     is acceptable.  The J2000 method is best matched to the way
24239     *     the argument is handled internally and will deliver the
24240     *     optimum resolution.  The MJD method and the date &amp; time methods
24241     *     are both good compromises between resolution and convenience.
24242     *
24243     * <li> The Celestial Intermediate Pole coordinates are the x,y
24244     *     components of the unit vector in the Geocentric Celestial
24245     *     Reference System.
24246     *
24247     * <li> The CIO locator s (in radians) positions the Celestial
24248     *     Intermediate Origin on the equator of the CIP.
24249     *
24250     * <li> The present function is faster, but slightly less accurate (about
24251     *     1 mas in X,Y), than the jauXys00a function.
24252     *</ol>
24253     *<p>Called:<ul>
24254     *     <li>{@link #jauPnm00b} classical NPB matrix, IAU 2000B
24255     *     <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
24256     *     <li>{@link #jauS00} the CIO locator s, given X,Y, IAU 2000A
24257     * </ul>
24258     *<p>Reference:
24259     *
24260     *     <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
24261     *     IERS Technical Note No. 32, BKG (2004)
24262     *
24263     *@version 2008 May 12
24264     *
24265     *  @since Release 20101201
24266     *
24267     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
24268     */
24269     public static ICRFrame jauXys00b(double date1, double date2)
24270     {
24271        double rbpn[][] = new double[3][3];
24272 
24273 
24274     /* Form the bias-precession-nutation matrix, IAU 2000A. */
24275        rbpn = jauPnm00b(date1, date2);
24276 
24277     /* Extract X,Y. */
24278        CelestialIntermediatePole cip = jauBpn2xy(rbpn);
24279 
24280     /* Obtain s. */
24281        double s = jauS00(date1, date2, cip.x, cip.y);
24282 
24283        return new ICRFrame(cip, s);
24284 
24285         }
24286     
24287 
24288     /**
24289     *  For a given TT date, compute the X,Y coordinates of the Celestial
24290     *  Intermediate Pole and the CIO locator s, using the IAU 2006
24291     *  precession and IAU 2000A nutation models.
24292     *
24293     *<p>This function is derived from the International Astronomical Union's
24294     *  SOFA (Standards Of Fundamental Astronomy) software collection.
24295     *
24296     *<p>Status:  support function.
24297     *
24298     *<!-- Given: -->
24299     *     @param date1 double TT as a 2-part Julian Date (Note 1)
24300     *     @param date2 double TT as a 2-part Julian Date (Note 1)
24301     *
24302     *<!-- Returned: -->
24303     *     @return x double    <u>returned</u> Celestial Intermediate Pole (Note 2)
24304     *             y double    <u>returned</u> Celestial Intermediate Pole (Note 2) 
24305     *             s             double    <u>returned</u> the CIO locator s (Note 2)
24306     *
24307     * <p>Notes:
24308     * <ol>
24309     *
24310     * <li> The TT date date1+date2 is a Julian Date, apportioned in any
24311     *     convenient way between the two arguments.  For example,
24312     *     JD(TT)=2450123.7 could be expressed in any of these ways,
24313     *     among others:
24314     *<pre>
24315     *            date1          date2
24316     *
24317     *         2450123.7           0.0       (JD method)
24318     *         2451545.0       -1421.3       (J2000 method)
24319     *         2400000.5       50123.2       (MJD method)
24320     *         2450123.5           0.2       (date &amp; time method)
24321     *</pre>
24322     *     The JD method is the most natural and convenient to use in
24323     *     cases where the loss of several decimal digits of resolution
24324     *     is acceptable.  The J2000 method is best matched to the way
24325     *     the argument is handled internally and will deliver the
24326     *     optimum resolution.  The MJD method and the date &amp; time methods
24327     *     are both good compromises between resolution and convenience.
24328     *
24329     * <li> The Celestial Intermediate Pole coordinates are the x,y components
24330     *     of the unit vector in the Geocentric Celestial Reference System.
24331     *
24332     * <li> The CIO locator s (in radians) positions the Celestial
24333     *     Intermediate Origin on the equator of the CIP.
24334     *
24335     * <li> Series-based solutions for generating X and Y are also available:
24336     *     see Capitaine &amp; Wallace (2006) and jauXy06.
24337     *</ol>
24338     *<p>Called:<ul>
24339     *     <li>{@link #jauPnm06a} classical NPB matrix, IAU 2006/2000A
24340     *     <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
24341     *     <li>{@link #jauS06} the CIO locator s, given X,Y, IAU 2006
24342     * </ul>
24343     *<p>References:
24344     *
24345     *    <p>Capitaine, N. &amp; Wallace, P.T., 2006, Astron.Astrophys. 450, 855
24346     *
24347     *    <p>Wallace, P.T. &amp; Capitaine, N., 2006, Astron.Astrophys. 459, 981
24348     *
24349     *@version 2008 May 11
24350     *
24351     *  @since Release 20101201
24352     *
24353     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
24354     */
24355     public static ICRFrame jauXys06a(double date1, double date2)
24356     {
24357        double rbpn[][] = new double[3][3];
24358 
24359 
24360     /* Form the bias-precession-nutation matrix, IAU 2000A. */
24361        rbpn = jauPnm06a(date1, date2);
24362 
24363     /* Extract X,Y. */
24364        CelestialIntermediatePole cip = jauBpn2xy(rbpn);
24365 
24366     /* Obtain s. */
24367        double s = jauS06(date1, date2, cip.x, cip.y);
24368 
24369        return new ICRFrame(cip, s);
24370 
24371         }
24372     
24373 
24374     /**
24375     *  Zero a p-vector.
24376     *
24377     *<p>This function is derived from the International Astronomical Union's
24378     *  SOFA (Standards Of Fundamental Astronomy) software collection.
24379     *
24380     *<p>Status:  vector/matrix support function.
24381     *
24382     *<!-- Returned: -->
24383     *     @param p         double[3]        <u>returned</u> p-vector
24384     *
24385     *@version 2008 May 11
24386     *
24387     *  @since Release 20101201
24388     *
24389     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
24390     */
24391     public static void jauZp(double p[] )
24392     {
24393        p[0] = 0.0;
24394        p[1] = 0.0;
24395        p[2] = 0.0;
24396 
24397        return;
24398 
24399         }
24400     
24401 
24402     /**
24403     *  Zero a pv-vector.
24404     *
24405     *<p>This function is derived from the International Astronomical Union's
24406     *  SOFA (Standards Of Fundamental Astronomy) software collection.
24407     *
24408     *<p>Status:  vector/matrix support function.
24409     *
24410     *<!-- Returned: -->
24411     *     @param pv        double[2][3]        <u>returned</u> pv-vector
24412     *
24413     *<p>Called:<ul>
24414     *     <li>{@link #jauZp} zero p-vector
24415     * </ul>
24416     *@version 2008 May 11
24417     *
24418     *  @since Release 20101201
24419     *
24420     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
24421     */
24422     public static void jauZpv(double pv[][])
24423     {
24424        jauZp(pv[0]);
24425        jauZp(pv[1]);
24426 
24427        return;
24428 
24429         }
24430     
24431 
24432     /**
24433     *  Initialize an r-matrix to the null matrix.
24434     *
24435     *<p>This function is derived from the International Astronomical Union's
24436     *  SOFA (Standards Of Fundamental Astronomy) software collection.
24437     *
24438     *<p>Status:  vector/matrix support function.
24439     *
24440     *<!-- Returned: -->
24441     *     @param r         double[3][3]      <u>returned</u> r-matrix
24442     *
24443     *@version 2008 May 11
24444     *
24445     *  @since Release 20101201 
24446     *
24447     *  <!-- Copyright (C) 2009 IAU SOFA Review Board.  See notes at end -->
24448     */
24449     public static void jauZr(double r[][])
24450     {
24451        int i, j;
24452 
24453 
24454        for (i = 0; i < 3; i++) {
24455           for (j = 0; j < 3; j++) {
24456              r[i][j] = 0.0;
24457           }
24458        }
24459 
24460        return;
24461 
24462         }
24463     
24464 
24465     /**
24466      * returns the first argument modulo the second.
24467      * Utility function to retain C use of fmod.
24468      * @param d
24469      * @param d2
24470      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 27 Jan 2010
24471      * @return
24472      */
24473     private static double fmod(double d, double d2) {
24474         return d % d2;
24475     }
24476  //IMPL new 20131202 routines after here
24477 
24478     /**
24479      *  Star-independent astrometry parameters.
24480      * 
24481      *  (Vectors eb, eh, em and v are all with respect to BCRS axes.)
24482      *  
24483      *  @author Paul Harrison (paul.harrison@manchester.ac.uk) 26 Mar 2014
24484      *  @since 20131202
24485      */
24486     public static class  Astrom {
24487         
24488 /** PM time interval (SSB, Julian years) */
24489        public double pmt;       
24490 /** SSB to observer (vector, au) [3]*/
24491        public double eb[] = new double[3];      
24492 /** Sun to observer (unit vector)[3] */
24493        public double eh[] = new double[3];      
24494 /** distance from Sun to observer (au) */
24495        public double em;         
24496 /** barycentric observer velocity (vector, c)[3] */
24497        public double v[] = new double[3];       
24498 /** sqrt(1-|v|^2): reciprocal of Lorenz factor */
24499        public double bm1;        
24500 /** bias-precession-nutation matrix [3][3] */
24501        public double bpn[][] = new double[3][3];  
24502 /** longitude + s' + dERA(DUT) (radians) */
24503        public double along;      
24504 /** geodetic latitude (radians) */
24505        public double phi;        
24506 /** polar motion xp wrt local meridian (radians) */
24507        public double xpl;        
24508 /** polar motion yp wrt local meridian (radians) */
24509        public double ypl;        
24510 /** sine of geodetic latitude */
24511        public double sphi;       
24512 /** cosine of geodetic latitude */
24513        public double cphi;       
24514 /** magnitude of diurnal aberration vector */
24515        public double diurab;     
24516 /** "local" Earth rotation angle (radians) */
24517        public double eral;       
24518 /** refraction constant A (radians) */
24519        public double refa;       
24520 /** refraction constant B (radians) */
24521        public double refb;       
24522        
24523        /**
24524         * 
24525         */
24526        public Astrom(){}
24527     } ;
24528 
24529     /**
24530      *  Body parameters for light deflection.
24531      *  @author Paul Harrison (paul.harrison@manchester.ac.uk) 26 Mar 2014
24532      *  @since 20131202
24533      */
24534     public static class Ldbody {
24535         /** mass of the body (solar masses) */
24536        public double bm;
24537        /** deflection limiter (radians^2/2) */
24538        public double dl; 
24539        /** barycentric PV of the body (au, au/day)[2][3] */
24540        public double pv[][] = new double [2][3];   
24541     } ;
24542 
24543 
24544     /**
24545      *  Apply aberration to transform natural direction into proper
24546      *  direction.
24547      *
24548      *<p>This function is derived from the International Astronomical Union's
24549      *  SOFA (Standards of Fundamental Astronomy) software collection.
24550      *
24551      *<p>Status:  support function.
24552      *
24553      *<!-- Given: -->
24554      *    @param pnat     double[3]    natural direction to the source (unit vector)
24555      *    @param v        double[3]    observer barycentric velocity in units of c
24556      *    @param s        double       distance between the Sun and the observer (au)
24557      *    @param bm1      double       sqrt(1-|v|^2): reciprocal of Lorenz factor
24558      *
24559      *<!-- Returned:-->
24560      *    @return ppr      double[3]     <b>Returned</b> proper direction to source (unit vector)
24561      *
24562      *<p>Notes:
24563      * <ol>
24564      *
24565      *  <li> The algorithm is based on Expr. (7.40) in the Explanatory
24566      *     Supplement (Urban &amp; Seidelmann 2013), but with the following
24567      *     changes:
24568      *
24569      *     <p>o  Rigorous rather than approximate normalization is applied.
24570      *
24571      *     <p>o  The gravitational potential term from Expr. (7) in
24572      *        Klioner (2003) is added, taking into account only the Sun's
24573      *        contribution.  This has a maximum effect of about
24574      *        0.4 microarcsecond.
24575      *
24576      *  <li> In almost all cases, the maximum accuracy will be limited by the
24577      *     supplied velocity.  For example, if the SOFA iauEpv00 function is
24578      *     used, errors of up to 5 microarcseconds could occur.
24579      *
24580      * </ol>
24581      *<p>References:
24582      * <ul>
24583      *
24584      * <li> Urban, S. &amp; Seidelmann, P. K. (eds), Explanatory Supplement to
24585      *     the Astronomical Almanac, 3rd ed., University Science Books
24586      *     (2013).
24587      *
24588      * <li> Klioner, Sergei A., "A practical relativistic model for micro-
24589      *     arcsecond astrometry in space", Astr. J. 125, 1580-1597 (2003).
24590      *
24591      * </ul>
24592      *  Called:
24593      * <ul>
24594      *     <li>{@link #jauPdp} scalar product of two p-vectors
24595      *
24596      * </ul>
24597      *@version  2013 October 9
24598      *
24599      *@since JSOFA release 20131202
24600      *
24601      *
24602      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
24603      */
24604     public static  double[] jauAb(double pnat[], double v[], double s, double bm1
24605            )
24606     {
24607         int i;
24608         double pdv, w1, w2, r2, w, p[] = new double[3], r;
24609         double ppr[] = new double[3];
24610 
24611         pdv = jauPdp(pnat, v);
24612         w1 = 1.0 + pdv/(1.0 + bm1);
24613         w2 = SRS/s;
24614         r2 = 0.0;
24615         for (i = 0; i < 3; i++) {
24616             w = pnat[i]*bm1 + w1*v[i] + w2*(v[i] - pdv*pnat[i]);
24617             p[i] = w;
24618             r2 = r2 + w*w;
24619         }
24620         r = sqrt(r2);
24621         for (i = 0; i < 3; i++) {
24622             ppr[i] = p[i]/r;
24623         }
24624         return ppr;
24625         /* Finished. */
24626 
24627 
24628     }
24629 
24630     /**
24631      *  For a geocentric observer, prepare star-independent astrometry
24632      *  parameters for transformations between ICRS and GCRS coordinates.
24633      *  The Earth ephemeris is supplied by the caller.
24634      *
24635      *  The parameters produced by this function are required in the
24636      *  parallax, light deflection and aberration parts of the astrometric
24637      *  transformation chain.
24638      *
24639      *<p>This function is derived from the International Astronomical Union's
24640      *  SOFA (Standards of Fundamental Astronomy) software collection.
24641      *
24642      *<p>Status:  support function.
24643      *
24644      *<!-- Given: -->
24645      *     @param date1   double        TDB as a 2-part...
24646      *     @param date2   double        ...Julian Date (Note 1)
24647      *     @param ebpv    double[2][3]  Earth barycentric pos/vel (au, au/day)
24648      *     @param ehp     double[3]     Earth heliocentric position (au)
24649      *
24650      *<!-- Returned:-->
24651      *     @param astrom  jauASTROM     <b>Returned</b> star-independent astrometry parameters:
24652      *
24653      *<p>Notes:
24654      * <ol>
24655      *
24656      *  <li> The TDB date date1+date2 is a Julian Date, apportioned in any
24657      *     convenient way between the two arguments.  For example,
24658      *     JD(TDB)=2450123.7 could be expressed in any of these ways, among
24659      *     others:
24660      *     <pre>
24661      *           date1          date2
24662      *
24663      *         2450123.7           0.0       (JD method)
24664      *         2451545.0       -1421.3       (J2000 method)
24665      *         2400000.5       50123.2       (MJD method)
24666      *         2450123.5           0.2       (date &amp; time method)
24667      *     </pre>
24668      *     <p>The JD method is the most natural and convenient to use in cases
24669      *     where the loss of several decimal digits of resolution is
24670      *     acceptable.  The J2000 method is best matched to the way the
24671      *     argument is handled internally and will deliver the optimum
24672      *     resolution.  The MJD method and the date &amp; time methods are both
24673      *     good compromises between resolution and convenience.  For most
24674      *     applications of this function the choice will not be at all
24675      *     critical.
24676      *
24677      *     <p>TT can be used instead of TDB without any significant impact on
24678      *     accuracy.
24679      *
24680      *  <li> All the vectors are with respect to BCRS axes.
24681      *
24682      *  <li> This is one of several functions that inserts into the astrom
24683      *     structure star-independent parameters needed for the chain of
24684      *     astrometric transformations {@literal ICRS <-> GCRS <-> CIRS <-> observed}.
24685      *
24686      *     <p>The various functions support different classes of observer and
24687      *     portions of the transformation chain:
24688      *     <pre>{@literal
24689      *          functions         observer        transformation
24690      *
24691      *       iauApcg iauApcg13    geocentric      ICRS <-> GCRS
24692      *       iauApci iauApci13    terrestrial     ICRS <-> CIRS
24693      *       iauApco iauApco13    terrestrial     ICRS <-> observed
24694      *       iauApcs iauApcs13    space           ICRS <-> GCRS
24695      *       iauAper iauAper13    terrestrial     update Earth rotation
24696      *       iauApio iauApio13    terrestrial     CIRS <-> observed
24697      *     }</pre>
24698      *     
24699      *     <p>Those with names ending in "13" use contemporary SOFA models to
24700      *     compute the various ephemerides.  The others accept ephemerides
24701      *     supplied by the caller.
24702      *
24703      *     <p>The transformation from ICRS to GCRS covers space motion,
24704      *     parallax, light deflection, and aberration.  From GCRS to CIRS
24705      *     comprises frame bias and precession-nutation.  From CIRS to
24706      *     observed takes account of Earth rotation, polar motion, diurnal
24707      *     aberration and parallax (unless subsumed into the {@literal ICRS <-> GCRS}
24708      *     transformation), and atmospheric refraction.
24709      *
24710      *  <li> The context structure astrom produced by this function is used by
24711      *     iauAtciq* and iauAticq*.
24712      *
24713      * </ol>
24714      *  Called:
24715      * <ul>
24716      *     <li>{@link #jauApcs} astrometry parameters, ICRS-GCRS, space observer
24717      *
24718      * </ul>
24719      *@version  2013 October 9
24720      *
24721      *@since JSOFA release 20131202
24722      *
24723      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
24724      */
24725     public static void jauApcg(double date1, double date2,
24726             double ebpv[][], double ehp[],
24727             Astrom astrom)
24728     {
24729         /* Geocentric observer */
24730         double pv[][] = { { 0.0, 0.0, 0.0 },
24731             { 0.0, 0.0, 0.0 } };
24732 
24733 
24734             /* Compute the star-independent astrometry parameters. */
24735             jauApcs(date1, date2, pv, ebpv, ehp, astrom);
24736 
24737             /* Finished. */
24738 
24739 
24740     }
24741 
24742     /**
24743      *  For a geocentric observer, prepare star-independent astrometry
24744      *  parameters for transformations between ICRS and GCRS coordinates.
24745      *  The caller supplies the date, and SOFA models are used to predict
24746      *  the Earth ephemeris.
24747      *
24748      *  The parameters produced by this function are required in the
24749      *  parallax, light deflection and aberration parts of the astrometric
24750      *  transformation chain.
24751      *
24752      *<p>This function is derived from the International Astronomical Union's
24753      *  SOFA (Standards of Fundamental Astronomy) software collection.
24754      *
24755      *<p>Status:  support function.
24756      *
24757      *<!-- Given: -->
24758      *     @param date1   double      TDB as a 2-part...
24759      *     @param date2   double      ...Julian Date (Note 1)
24760      *
24761      *<!-- Returned:-->
24762      *     @param astrom     <b>Returned</b> star-independent astrometry parameters:
24763      *
24764      *<p>Notes:
24765      * <ol>
24766      *
24767      *  <li> The TDB date date1+date2 is a Julian Date, apportioned in any
24768      *     convenient way between the two arguments.  For example,
24769      *     JD(TDB)=2450123.7 could be expressed in any of these ways, among
24770      *     others:
24771      *     <pre>
24772      *            date1          date2
24773      *
24774      *         2450123.7           0.0       (JD method)
24775      *         2451545.0       -1421.3       (J2000 method)
24776      *         2400000.5       50123.2       (MJD method)
24777      *         2450123.5           0.2       (date &amp; time method)
24778      *     </pre>
24779      *     <p>The JD method is the most natural and convenient to use in cases
24780      *     where the loss of several decimal digits of resolution is
24781      *     acceptable.  The J2000 method is best matched to the way the
24782      *     argument is handled internally and will deliver the optimum
24783      *     resolution.  The MJD method and the date &amp; time methods are both
24784      *     good compromises between resolution and convenience.  For most
24785      *     applications of this function the choice will not be at all
24786      *     critical.
24787      *
24788      *     <p>TT can be used instead of TDB without any significant impact on
24789      *     accuracy.
24790      *
24791      *  <li> All the vectors are with respect to BCRS axes.
24792      *
24793      *  <li> In cases where the caller wishes to supply his own Earth
24794      *     ephemeris, the function iauApcg can be used instead of the present
24795      *     function.
24796      *
24797      *  <li> This is one of several functions that inserts into the astrom
24798      *     structure star-independent parameters needed for the chain of
24799      *     astrometric transformations {@literal ICRS <-> GCRS <-> CIRS <-> observed}.
24800      *
24801      *     <p>The various functions support different classes of observer and
24802      *     portions of the transformation chain:
24803      *     <pre>
24804      *     {@literal
24805      *          functions         observer        transformation
24806      *
24807      *       iauApcg iauApcg13    geocentric      ICRS <-> GCRS
24808      *       iauApci iauApci13    terrestrial     ICRS <-> CIRS
24809      *       iauApco iauApco13    terrestrial     ICRS <-> observed
24810      *       iauApcs iauApcs13    space           ICRS <-> GCRS
24811      *       iauAper iauAper13    terrestrial     update Earth rotation
24812      *       iauApio iauApio13    terrestrial     CIRS <-> observed
24813      *     }
24814      *     </pre>
24815      *     <p>Those with names ending in "13" use contemporary SOFA models to
24816      *     compute the various ephemerides.  The others accept ephemerides
24817      *     supplied by the caller.
24818      *
24819      *     <p>The transformation from ICRS to GCRS covers space motion,
24820      *     parallax, light deflection, and aberration.  From GCRS to CIRS
24821      *     comprises frame bias and precession-nutation.  From CIRS to
24822      *     observed takes account of Earth rotation, polar motion, diurnal
24823      *     aberration and parallax (unless subsumed into the {@literal ICRS <-> GCRS}
24824      *     transformation), and atmospheric refraction.
24825      *
24826      *  <li> The context structure astrom produced by this function is used by
24827      *     iauAtciq* and iauAticq*.
24828      *
24829      * </ol>
24830      *  Called:
24831      * <ul>
24832      *     <li>{@link #jauEpv00} Earth position and velocity
24833      *     <li>{@link #jauApcg} astrometry parameters, ICRS-GCRS, geocenter
24834      *
24835      * </ul>
24836      *@version  2013 October 9
24837      *
24838      *@since JSOFA release 20131202
24839      *
24840      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
24841      */
24842     public static void jauApcg13(double date1, double date2, Astrom astrom)
24843     {
24844         double ehpv[][] = new double[2][3], ebpv[][] = new double[2][3];
24845 
24846 
24847         /* Earth barycentric &amp; heliocentric position/velocity (au, au/d). */
24848         jauEpv00(date1, date2, ehpv, ebpv);
24849 
24850         /* Compute the star-independent astrometry parameters. */
24851         jauApcg(date1, date2, ebpv, ehpv[0], astrom);
24852 
24853         /* Finished. */
24854 
24855 
24856     }
24857 
24858     /**
24859      *  For a terrestrial observer, prepare star-independent astrometry
24860      *  parameters for transformations between ICRS and geocentric CIRS
24861      *  coordinates.  The Earth ephemeris and CIP/CIO are supplied by the
24862      *  caller.
24863      *
24864      *  The parameters produced by this function are required in the
24865      *  parallax, light deflection, aberration, and bias-precession-nutation
24866      *  parts of the astrometric transformation chain.
24867      *
24868      *<p>This function is derived from the International Astronomical Union's
24869      *  SOFA (Standards of Fundamental Astronomy) software collection.
24870      *
24871      *<p>Status:  support function.
24872      *
24873      *<!-- Given: -->
24874      *     @param date1   double        TDB as a 2-part...
24875      *     @param date2   double        ...Julian Date (Note 1)
24876      *     @param ebpv    double[2][3]  Earth barycentric position/velocity (au, au/day)
24877      *     @param ehp     double[3]     Earth heliocentric position (au)
24878      *     @param x double        CIP X,Y (components of unit vector)
24879      *     @param y double        CIP X,Y (components of unit vector) 
24880      *     @param s       double        the CIO locator s (radians)
24881      *
24882      *<!-- Returned:-->
24883      *     @param astrom       <b>Returned</b> star-independent astrometry parameters:
24884      *
24885      *<p>Notes:
24886      * <ol>
24887      *
24888      *  <li> The TDB date date1+date2 is a Julian Date, apportioned in any
24889      *     convenient way between the two arguments.  For example,
24890      *     JD(TDB)=2450123.7 could be expressed in any of these ways, among
24891      *     others:
24892      *     <pre>
24893      *            date1          date2
24894      *
24895      *         2450123.7           0.0       (JD method)
24896      *         2451545.0       -1421.3       (J2000 method)
24897      *         2400000.5       50123.2       (MJD method)
24898      *         2450123.5           0.2       (date &amp; time method)
24899      *     </pre>
24900      *     <p>The JD method is the most natural and convenient to use in cases
24901      *     where the loss of several decimal digits of resolution is
24902      *     acceptable.  The J2000 method is best matched to the way the
24903      *     argument is handled internally and will deliver the optimum
24904      *     resolution.  The MJD method and the date &amp; time methods are both
24905      *     good compromises between resolution and convenience.  For most
24906      *     applications of this function the choice will not be at all
24907      *     critical.
24908      *
24909      *     <p>TT can be used instead of TDB without any significant impact on
24910      *     accuracy.
24911      *
24912      *  <li> All the vectors are with respect to BCRS axes.
24913      *
24914      *  <li> In cases where the caller does not wish to provide the Earth
24915      *     ephemeris and CIP/CIO, the function iauApci13 can be used instead
24916      *     of the present function.  This computes the required quantities
24917      *     using other SOFA functions.
24918      *
24919      *  <li> This is one of several functions that inserts into the astrom
24920      *     structure star-independent parameters needed for the chain of
24921      *     astrometric transformations {@literal ICRS <-> GCRS <-> CIRS <-> observed.}
24922      *
24923      *     <p>The various functions support different classes of observer and
24924      *     portions of the transformation chain:
24925      *     <pre>{@literal
24926      *          functions         observer        transformation
24927      *
24928      *       iauApcg iauApcg13    geocentric      ICRS <-> GCRS
24929      *       iauApci iauApci13    terrestrial     ICRS <-> CIRS
24930      *       iauApco iauApco13    terrestrial     ICRS <-> observed
24931      *       iauApcs iauApcs13    space           ICRS <-> GCRS
24932      *       iauAper iauAper13    terrestrial     update Earth rotation
24933      *       iauApio iauApio13    terrestrial     CIRS <-> observed
24934      *     }</pre>
24935      *     <p>Those with names ending in "13" use contemporary SOFA models to
24936      *     compute the various ephemerides.  The others accept ephemerides
24937      *     supplied by the caller.
24938      *
24939      *     <p>The transformation from ICRS to GCRS covers space motion,
24940      *     parallax, light deflection, and aberration.  From GCRS to CIRS
24941      *     comprises frame bias and precession-nutation.  From CIRS to
24942      *     observed takes account of Earth rotation, polar motion, diurnal
24943      *     aberration and parallax (unless subsumed into the {@literal ICRS <-> GCRS}
24944      *     transformation), and atmospheric refraction.
24945      *
24946      *  <li> The context structure astrom produced by this function is used by
24947      *     iauAtciq* and iauAticq*.
24948      *
24949      * </ol>
24950      *  Called:
24951      * <ul>
24952      *     <li>{@link #jauApcg} astrometry parameters, ICRS-GCRS, geocenter
24953      *     <li>{@link #jauC2ixys} celestial-to-intermediate matrix, given X,Y and s
24954      *
24955      * </ul>
24956      *@version  2013 September 25
24957      *
24958      *@since JSOFA release 20131202
24959      *
24960      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
24961      */
24962     public static void jauApci(double date1, double date2,
24963             double ebpv[][], double ehp[],
24964             double x, double y, double s,
24965             Astrom astrom)
24966     {
24967 
24968         /* Star-independent astrometry parameters for geocenter. */
24969         jauApcg(date1, date2, ebpv, ehp, astrom);
24970 
24971         /* CIO based BPN matrix. */
24972         astrom.bpn = jauC2ixys(x, y, s);
24973 
24974         /* Finished. */
24975 
24976 
24977     }
24978 
24979     /**
24980      *  For a terrestrial observer, prepare star-independent astrometry
24981      *  parameters for transformations between ICRS and geocentric CIRS
24982      *  coordinates.  The caller supplies the date, and SOFA models are used
24983      *  to predict the Earth ephemeris and CIP/CIO.
24984      *
24985      *  The parameters produced by this function are required in the
24986      *  parallax, light deflection, aberration, and bias-precession-nutation
24987      *  parts of the astrometric transformation chain.
24988      *
24989      *<p>This function is derived from the International Astronomical Union's
24990      *  SOFA (Standards of Fundamental Astronomy) software collection.
24991      *
24992      *<p>Status:  support function.
24993      *
24994      *<!-- Given: -->
24995      *     @param date1   double       TDB as a 2-part...
24996      *     @param date2   double       ...Julian Date (Note 1)
24997      *     
24998      *<!-- Returned:-->
24999      *     @param astrom  jauASTROM    <b>Returned</b> star-independent astrometry parameters:
25000      *                    pmt     double         <b>Returned</b> PM time interval (SSB, Julian years)
25001      *                    eb      double[3]      <b>Returned</b> SSB to observer (vector, au)
25002      *                    eh      double[3]      <b>Returned</b> Sun to observer (unit vector)
25003      *                    em      double         <b>Returned</b> distance from Sun to observer (au)
25004      *                    v       double[3]      <b>Returned</b> barycentric observer velocity (vector, c)
25005      *                    bm1     double         <b>Returned</b> sqrt(1-|v|^2): reciprocal of Lorenz factor
25006      *                    bpn     double[3][3]   <b>Returned</b> bias-precession-nutation matrix
25007      *                    along   double         <b>Returned</b> unchanged
25008      *                    xpl     double         <b>Returned</b> unchanged
25009      *                    ypl     double         <b>Returned</b> unchanged
25010      *                    sphi    double         <b>Returned</b> unchanged
25011      *                    cphi    double         <b>Returned</b> unchanged
25012      *                    diurab  double         <b>Returned</b> unchanged
25013      *                    eral    double         <b>Returned</b> unchanged
25014      *                    refa    double         <b>Returned</b> unchanged
25015      *                    refb    double         <b>Returned</b> unchanged
25016      *     @return       double*       <b>Returned</b> equation of the origins (ERA-GST)
25017      *
25018      *<p>Notes:
25019      * <ol>
25020      *
25021      *  <li> The TDB date date1+date2 is a Julian Date, apportioned in any
25022      *     convenient way between the two arguments.  For example,
25023      *     JD(TDB)=2450123.7 could be expressed in any of these ways, among
25024      *     others:
25025      *     <pre>
25026      *            date1          date2
25027      *
25028      *         2450123.7           0.0       (JD method)
25029      *         2451545.0       -1421.3       (J2000 method)
25030      *         2400000.5       50123.2       (MJD method)
25031      *         2450123.5           0.2       (date &amp; time method)
25032      *     </pre>
25033      *     <p>The JD method is the most natural and convenient to use in cases
25034      *     where the loss of several decimal digits of resolution is
25035      *     acceptable.  The J2000 method is best matched to the way the
25036      *     argument is handled internally and will deliver the optimum
25037      *     resolution.  The MJD method and the date &amp; time methods are both
25038      *     good compromises between resolution and convenience.  For most
25039      *     applications of this function the choice will not be at all
25040      *     critical.
25041      *
25042      *     <p>TT can be used instead of TDB without any significant impact on
25043      *     accuracy.
25044      *
25045      *  <li> All the vectors are with respect to BCRS axes.
25046      *
25047      *  <li> In cases where the caller wishes to supply his own Earth
25048      *     ephemeris and CIP/CIO, the function iauApci can be used instead
25049      *     of the present function.
25050      *
25051      *  <li> This is one of several functions that inserts into the astrom
25052      *     structure star-independent parameters needed for the chain of
25053      *     astrometric transformations {@literal ICRS <-> GCRS <-> CIRS <-> observed.}
25054      *
25055      *     <p>The various functions support different classes of observer and
25056      *     portions of the transformation chain:
25057      *     <pre>{@literal
25058      *          functions         observer        transformation
25059      *
25060      *       iauApcg iauApcg13    geocentric      ICRS <-> GCRS
25061      *       iauApci iauApci13    terrestrial     ICRS <-> CIRS
25062      *       iauApco iauApco13    terrestrial     ICRS <-> observed
25063      *       iauApcs iauApcs13    space           ICRS <-> GCRS
25064      *       iauAper iauAper13    terrestrial     update Earth rotation
25065      *       iauApio iauApio13    terrestrial     CIRS <-> observed
25066      *     }</pre>
25067      *     <p>Those with names ending in "13" use contemporary SOFA models to
25068      *     compute the various ephemerides.  The others accept ephemerides
25069      *     supplied by the caller.
25070      *
25071      *     <p>The transformation from ICRS to GCRS covers space motion,
25072      *     parallax, light deflection, and aberration.  From GCRS to CIRS
25073      *     comprises frame bias and precession-nutation.  From CIRS to
25074      *     observed takes account of Earth rotation, polar motion, diurnal
25075      *     aberration and parallax (unless subsumed into the {@literal ICRS <-> GCRS}
25076      *     transformation), and atmospheric refraction.
25077      *
25078      *  <li> The context structure astrom produced by this function is used by
25079      *     iauAtciq* and iauAticq*.
25080      *
25081      * </ol>
25082      *  Called:
25083      * <ul>
25084      *     <li>{@link #jauEpv00} Earth position and velocity
25085      *     <li>{@link #jauPnm06a} classical NPB matrix, IAU 2006/2000A
25086      *     <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
25087      *     <li>{@link #jauS06} the CIO locator s, given X,Y, IAU 2006
25088      *     <li>{@link #jauApci} astrometry parameters, ICRS-CIRS
25089      *     <li>{@link #jauEors} equation of the origins, given NPB matrix and s
25090      *
25091      * </ul>
25092      *@version  2013 October 9
25093      *
25094      *@since JSOFA release 20131202
25095      *
25096      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
25097      */
25098     public static double jauApci13(double date1, double date2,
25099             Astrom astrom)
25100     {
25101         double ehpv[][] = new double[2][3], ebpv[][] = new double[2][3], r[][], s;
25102 
25103 
25104         /* Earth barycentric &amp; heliocentric position/velocity (au, au/d). */
25105         jauEpv00(date1, date2, ehpv, ebpv);
25106 
25107         /* Form the equinox based BPN matrix, IAU 2006/2000A. */
25108         r = jauPnm06a(date1, date2);
25109 
25110         /* Extract CIP X,Y. */
25111         CelestialIntermediatePole cip = jauBpn2xy(r);
25112 
25113         /* Obtain CIO locator s. */
25114         s = jauS06(date1, date2, cip.x, cip.y);
25115 
25116         /* Compute the star-independent astrometry parameters. */
25117         jauApci(date1, date2, ebpv, ehpv[0], cip.x, cip.y, s, astrom);
25118 
25119         /* Equation of the origins. */
25120         return jauEors(r, s);
25121 
25122         /* Finished. */
25123 
25124 
25125     }
25126 
25127     /**
25128      *  For a terrestrial observer, prepare star-independent astrometry
25129      *  parameters for transformations between ICRS and observed
25130      *  coordinates.  The caller supplies the Earth ephemeris, the Earth
25131      *  rotation information and the refraction constants as well as the
25132      *  site coordinates.
25133      *
25134      *<p>This function is derived from the International Astronomical Union's
25135      *  SOFA (Standards of Fundamental Astronomy) software collection.
25136      *
25137      *<p>Status:  support function.
25138      *
25139      *<!-- Given: -->
25140      *     @param date1   double        TDB as a 2-part...
25141      *     @param date2   double        ...Julian Date (Note 1)
25142      *     @param ebpv    double[2][3]  Earth barycentric PV (au, au/day, Note 2)
25143      *     @param ehp     double[3]     Earth heliocentric P (au, Note 2)
25144      *     @param x double        CIP X,Y (components of unit vector)
25145      *     @param y double        CIP X,Y (components of unit vector) 
25146      *     @param s       double        the CIO locator s (radians)
25147      *     @param theta   double        Earth rotation angle (radians)
25148      *     @param elong   double        longitude (radians, east +ve, Note 3)
25149      *     @param phi     double        latitude (geodetic, radians, Note 3)
25150      *     @param hm      double        height above ellipsoid (m, geodetic, Note 3)
25151      *     @param xp double        polar motion coordinates (radians, Note 4)
25152      *     @param yp double        polar motion coordinates (radians, Note 4) 
25153      *     @param sp      double        the TIO locator s' (radians, Note 4)
25154      *     @param refa    double        refraction constant A (radians, Note 5)
25155      *     @param refb    double        refraction constant B (radians, Note 5)
25156      *
25157      *<!-- Returned:-->
25158      *     @param astrom       <b>Returned</b> star-independent astrometry parameters:
25159      *
25160      *<p>Notes:
25161      * <ol>
25162      *
25163      *  <li> The TDB date date1+date2 is a Julian Date, apportioned in any
25164      *     convenient way between the two arguments.  For example,
25165      *     JD(TDB)=2450123.7 could be expressed in any of these ways, among
25166      *     others:
25167      *     <pre>
25168      *            date1          date2
25169      *
25170      *         2450123.7           0.0       (JD method)
25171      *         2451545.0       -1421.3       (J2000 method)
25172      *         2400000.5       50123.2       (MJD method)
25173      *         2450123.5           0.2       (date &amp; time method)
25174      *     </pre>
25175      *     <p>The JD method is the most natural and convenient to use in cases
25176      *     where the loss of several decimal digits of resolution is
25177      *     acceptable.  The J2000 method is best matched to the way the
25178      *     argument is handled internally and will deliver the optimum
25179      *     resolution.  The MJD method and the date &amp; time methods are both
25180      *     good compromises between resolution and convenience.  For most
25181      *     applications of this function the choice will not be at all
25182      *     critical.
25183      *
25184      *     <p>TT can be used instead of TDB without any significant impact on
25185      *     accuracy.
25186      *
25187      *  <li> The vectors eb, eh, and all the astrom vectors, are with respect
25188      *     to BCRS axes.
25189      *
25190      *  <li> The geographical coordinates are with respect to the WGS84
25191      *     reference ellipsoid.  TAKE CARE WITH THE LONGITUDE SIGN
25192      *     CONVENTION:  the longitude required by the present function is
25193      *     right-handed, i.e. east-positive, in accordance with geographical
25194      *     convention.
25195      *
25196      *  <li> xp and yp are the coordinates (in radians) of the Celestial
25197      *     Intermediate Pole with respect to the International Terrestrial
25198      *     Reference System (see IERS Conventions), measured along the
25199      *     meridians 0 and 90 deg west respectively.  sp is the TIO locator
25200      *     s', in radians, which positions the Terrestrial Intermediate
25201      *     Origin on the equator.  For many applications, xp, yp and
25202      *     (especially) sp can be set to zero.
25203      *
25204      *     <p>Internally, the polar motion is stored in a form rotated onto the
25205      *     local meridian.
25206      *
25207      *  <li> The refraction constants refa and refb are for use in a
25208      *     dZ = A*tan(Z)+B*tan^3(Z) model, where Z is the observed
25209      *     (i.e. refracted) zenith distance and dZ is the amount of
25210      *     refraction.
25211      *
25212      *  <li> It is advisable to take great care with units, as even unlikely
25213      *     values of the input parameters are accepted and processed in
25214      *     accordance with the models used.
25215      *
25216      *  <li> In cases where the caller does not wish to provide the Earth
25217      *     Ephemeris, the Earth rotation information and refraction
25218      *     constants, the function iauApco13 can be used instead of the
25219      *     present function.  This starts from UTC and weather readings etc.
25220      *     and computes suitable values using other SOFA functions.
25221      *
25222      *  <li> This is one of several functions that inserts into the astrom
25223      *     structure star-independent parameters needed for the chain of
25224      *     astrometric transformations {@literal ICRS <-> GCRS <-> CIRS <-> observed.}
25225      *
25226      *     <p>The various functions support different classes of observer and
25227      *     portions of the transformation chain:
25228      *     <pre>{@literal
25229      *          functions         observer        transformation
25230      *
25231      *       iauApcg iauApcg13    geocentric      ICRS <-> GCRS
25232      *       iauApci iauApci13    terrestrial     ICRS <-> CIRS
25233      *       iauApco iauApco13    terrestrial     ICRS <-> observed
25234      *       iauApcs iauApcs13    space           ICRS <-> GCRS
25235      *       iauAper iauAper13    terrestrial     update Earth rotation
25236      *       iauApio iauApio13    terrestrial     CIRS <-> observed
25237      *     }</pre>
25238      *     <p>Those with names ending in "13" use contemporary SOFA models to
25239      *     compute the various ephemerides.  The others accept ephemerides
25240      *     supplied by the caller.
25241      *
25242      *     <p>The transformation from ICRS to GCRS covers space motion,
25243      *     parallax, light deflection, and aberration.  From GCRS to CIRS
25244      *     comprises frame bias and precession-nutation.  From CIRS to
25245      *     observed takes account of Earth rotation, polar motion, diurnal
25246      *     aberration and parallax (unless subsumed into the {@literal ICRS <-> GCRS}
25247      *     transformation), and atmospheric refraction.
25248      *
25249      *  <li> The context structure astrom produced by this function is used by
25250      *     iauAtioq, iauAtoiq, iauAtciq* and iauAticq*.
25251      *
25252      * </ol>
25253      *  Called:
25254      * <ul>
25255      *     <li>{@link #jauAper} astrometry parameters: update ERA
25256      *     <li>{@link #jauC2ixys} celestial-to-intermediate matrix, given X,Y and s
25257      *     <li>{@link #jauPvtob} position/velocity of terrestrial station
25258      *     <li>{@link #jauTrxpv} product of transpose of r-matrix and pv-vector
25259      *     <li>{@link #jauApcs} astrometry parameters, ICRS-GCRS, space observer
25260      *     <li>{@link #jauCr} copy r-matrix
25261      *
25262      * </ul>
25263      *@version  2013 October 9
25264      *
25265      *@since JSOFA release 20131202
25266      *
25267      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
25268      * @throws JSOFAInternalError 
25269      * @throws JSOFAIllegalParameter 
25270      */
25271     public static void jauApco(double date1, double date2,
25272             double ebpv[][], double ehp[],
25273             double x, double y, double s, double theta,
25274             double elong, double phi, double hm,
25275             double xp, double yp, double sp,
25276             double refa, double refb,
25277             Astrom astrom) throws JSOFAIllegalParameter, JSOFAInternalError
25278     {
25279         double sl, cl, r[][], pvc[][], pv[][];
25280 
25281 
25282         /* Longitude with adjustment for TIO locator s'. */
25283         astrom.along = elong + sp;
25284 
25285         /* Polar motion, rotated onto the local meridian. */
25286         sl = sin(astrom.along);
25287         cl = cos(astrom.along);
25288         astrom.xpl = xp*cl - yp*sl;
25289         astrom.ypl = xp*sl + yp*cl;
25290 
25291         /* Functions of latitude. */
25292         astrom.sphi = sin(phi);
25293         astrom.cphi = cos(phi);
25294 
25295         /* Refraction constants. */
25296         astrom.refa = refa;
25297         astrom.refb = refb;
25298 
25299         /* Local Earth rotation angle. */
25300         jauAper(theta, astrom);
25301 
25302         /* Disable the (redundant) diurnal aberration step. */
25303         astrom.diurab = 0.0;
25304 
25305         /* CIO based BPN matrix. */
25306         r = jauC2ixys(x, y, s);
25307 
25308         /* Observer's geocentric position and velocity (m, m/s, CIRS). */
25309         pvc = jauPvtob(elong, phi, hm, xp, yp, sp, theta);
25310 
25311         /* Rotate into GCRS. */
25312         pv = jauTrxpv(r, pvc);
25313 
25314         /* ICRS <-> GCRS parameters. */
25315         jauApcs(date1, date2, pv, ebpv, ehp, astrom);
25316 
25317         /* Store the CIO based BPN matrix. */
25318         jauCr(r, astrom.bpn );
25319 
25320         /* Finished. */
25321 
25322 
25323     }
25324 
25325     /**
25326      *  For a terrestrial observer, prepare star-independent astrometry
25327      *  parameters for transformations between ICRS and observed
25328      *  coordinates.  The caller supplies UTC, site coordinates, ambient air
25329      *  conditions and observing wavelength, and SOFA models are used to
25330      *  obtain the Earth ephemeris, CIP/CIO and refraction constants.
25331      *
25332      *  The parameters produced by this function are required in the
25333      *  parallax, light deflection, aberration, and bias-precession-nutation
25334      *  parts of the ICRS/CIRS transformations.
25335      *
25336      *<p>This function is derived from the International Astronomical Union's
25337      *  SOFA (Standards of Fundamental Astronomy) software collection.
25338      *
25339      *<p>Status:  support function.
25340      *
25341      *<!-- Given: -->
25342      *     @param utc1    double      UTC as a 2-part...
25343      *     @param utc2    double      ...quasi Julian Date (Notes 1,2)
25344      *     @param dut1    double      UT1-UTC (seconds, Note 3)
25345      *     @param elong   double      longitude (radians, east +ve, Note 4)
25346      *     @param phi     double      latitude (geodetic, radians, Note 4)
25347      *     @param hm      double      height above ellipsoid (m, geodetic, Notes 4,6)
25348      *     @param xp double      polar motion coordinates (radians, Note 5)
25349      *     @param yp double      polar motion coordinates (radians, Note 5) 
25350      *     @param phpa    double      pressure at the observer (hPa = mB, Note 6)
25351      *     @param tc      double      ambient temperature at the observer (deg C)
25352      *     @param rh      double      relative humidity at the observer (range 0-1)
25353      *     @param wl      double      wavelength (micrometers, Note 7)
25354      *
25355      *<!-- Returned:-->
25356      *     @param astrom     <b>Returned</b> star-independent astrometry parameters:
25357      *         
25358      *     
25359      *     @return       double      <b>Returned</b> equation of the origins (ERA-GST)
25360      *
25361      *  @throws JSOFAInternalError
25362      *  @throws JSOFAIllegalParameter
25363      *             int         status:   <b>Returned</b> +1 = dubious year (Note 2)
25364      *                                 0  =   <b>Returned</b> OK
25365      *                                -1  =   <b>Returned</b> unacceptable date
25366      *
25367      *<p>Notes:
25368      * <ol>
25369      *
25370      *  <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
25371      *      convenient way between the two arguments, for example where utc1
25372      *      is the Julian Day Number and utc2 is the fraction of a day.
25373      *
25374      *      <p>However, JD cannot unambiguously represent UTC during a leap
25375      *      second unless special measures are taken.  The convention in the
25376      *      present function is that the JD day represents UTC days whether
25377      *      the length is 86399, 86400 or 86401 SI seconds.
25378      *
25379      *      <p>Applications should use the function iauDtf2d to convert from
25380      *      calendar date and time of day into 2-part quasi Julian Date, as
25381      *      it implements the leap-second-ambiguity convention just
25382      *      described.
25383      *
25384      *  <li> The warning status "dubious year" flags UTCs that predate the
25385      *      introduction of the time scale or that are too far in the
25386      *      future to be trusted.  See iauDat for further details.
25387      *
25388      *  <li> UT1-UTC is tabulated in IERS bulletins.  It increases by exactly
25389      *      one second at the end of each positive UTC leap second,
25390      *      introduced in order to keep UT1-UTC within +/- 0.9s.  n.b. This
25391      *      practice is under review, and in the future UT1-UTC may grow
25392      *      essentially without limit.
25393      *
25394      *  <li> The geographical coordinates are with respect to the WGS84
25395      *      reference ellipsoid.  TAKE CARE WITH THE LONGITUDE SIGN:  the
25396      *      longitude required by the present function is east-positive
25397      *      (i.e. right-handed), in accordance with geographical convention.
25398      *
25399      *  <li> The polar motion xp,yp can be obtained from IERS bulletins.  The
25400      *      values are the coordinates (in radians) of the Celestial
25401      *      Intermediate Pole with respect to the International Terrestrial
25402      *      Reference System (see IERS Conventions 2003), measured along the
25403      *      meridians 0 and 90 deg west respectively.  For many
25404      *      applications, xp and yp can be set to zero.
25405      *
25406      *      <p>Internally, the polar motion is stored in a form rotated onto
25407      *      the local meridian.
25408      *
25409      *  <li> If hm, the height above the ellipsoid of the observing station
25410      *      in meters, is not known but phpa, the pressure in hPa (=mB), is
25411      *      available, an adequate estimate of hm can be obtained from the
25412      *      expression
25413      *
25414      *            <p>hm = -29.3 * tsl * log ( phpa / 1013.25 );
25415      *
25416      *      <p>where tsl is the approximate sea-level air temperature in K
25417      *      (See Astrophysical Quantities, C.W.Allen, 3rd edition, section
25418      *      52).  Similarly, if the pressure phpa is not known, it can be
25419      *      estimated from the height of the observing station, hm, as
25420      *      follows:
25421      *
25422      *            <p>phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) );
25423      *
25424      *      <p>Note, however, that the refraction is nearly proportional to
25425      *      the pressure and that an accurate phpa value is important for
25426      *      precise work.
25427      *
25428      *  <li> The argument wl specifies the observing wavelength in
25429      *      micrometers.  The transition from optical to radio is assumed to
25430      *      occur at 100 micrometers (about 3000 GHz).
25431      *
25432      *  <li> It is advisable to take great care with units, as even unlikely
25433      *      values of the input parameters are accepted and processed in
25434      *      accordance with the models used.
25435      *
25436      *  <li> In cases where the caller wishes to supply his own Earth
25437      *      ephemeris, Earth rotation information and refraction constants,
25438      *      the function iauApco can be used instead of the present function.
25439      *
25440      *  <li> This is one of several functions that inserts into the astrom
25441      *      structure star-independent parameters needed for the chain of
25442      *      astrometric transformations {@literal ICRS <-> GCRS <-> CIRS <-> observed.}
25443      *
25444      *      <p>The various functions support different classes of observer and
25445      *      portions of the transformation chain:
25446      *      <pre>{@literal
25447      *          functions         observer        transformation
25448      *
25449      *       iauApcg iauApcg13    geocentric      ICRS <-> GCRS
25450      *       iauApci iauApci13    terrestrial     ICRS <-> CIRS
25451      *       iauApco iauApco13    terrestrial     ICRS <-> observed
25452      *       iauApcs iauApcs13    space           ICRS <-> GCRS
25453      *       iauAper iauAper13    terrestrial     update Earth rotation
25454      *       iauApio iauApio13    terrestrial     CIRS <-> observed
25455      *      }</pre>
25456      *      <p>Those with names ending in "13" use contemporary SOFA models to
25457      *      compute the various ephemerides.  The others accept ephemerides
25458      *      supplied by the caller.
25459      *
25460      *      <p>The transformation from ICRS to GCRS covers space motion,
25461      *      parallax, light deflection, and aberration.  From GCRS to CIRS
25462      *      comprises frame bias and precession-nutation.  From CIRS to
25463      *      observed takes account of Earth rotation, polar motion, diurnal
25464      *      aberration and parallax (unless subsumed into the {@literal ICRS <-> GCRS}
25465      *      transformation), and atmospheric refraction.
25466      *
25467      *  <li> The context structure astrom produced by this function is used
25468      *      by iauAtioq, iauAtoiq, iauAtciq* and iauAticq*.
25469      *
25470      * </ol>
25471      *  Called:
25472      * <ul>
25473      *     <li>{@link #jauUtctai} UTC to TAI
25474      *     <li>{@link #jauTaitt} TAI to TT
25475      *     <li>{@link #jauUtcut1} UTC to UT1
25476      *     <li>{@link #jauEpv00} Earth position and velocity
25477      *     <li>{@link #jauPnm06a} classical NPB matrix, IAU 2006/2000A
25478      *     <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
25479      *     <li>{@link #jauS06} the CIO locator s, given X,Y, IAU 2006
25480      *     <li>{@link #jauEra00} Earth rotation angle, IAU 2000
25481      *     <li>{@link #jauSp00} the TIO locator s', IERS 2000
25482      *     <li>{@link #jauRefco} refraction constants for given ambient conditions
25483      *     <li>{@link #jauApco} astrometry parameters, ICRS-observed
25484      *     <li>{@link #jauEors} equation of the origins, given NPB matrix and s
25485      *
25486      * </ul>
25487      *@version  2013 December 5
25488      *
25489      *@since JSOFA release 20131202
25490      *
25491      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
25492      * @throws JSOFAInternalError 
25493      * @throws JSOFAIllegalParameter 
25494      */
25495     public static double jauApco13(double utc1, double utc2, double dut1,
25496             double elong, double phi, double hm, double xp, double yp,
25497             double phpa, double tc, double rh, double wl,
25498             Astrom astrom ) throws JSOFAIllegalParameter, JSOFAInternalError
25499     {
25500         double ehpv[][] = new double[2][3], ebpv[][] = new double[2][3],
25501         r[][], s, theta, sp;
25502         double eo;
25503 
25504 
25505         /* UTC to other time scales. */
25506         JulianDate tai = jauUtctai(utc1, utc2);
25507         JulianDate tt = jauTaitt(tai.djm0, tai.djm1);
25508         JulianDate ut1 = jauUtcut1(utc1, utc2, dut1);
25509 
25510         /* Earth barycentric &amp; heliocentric position/velocity (au, au/d). */
25511         jauEpv00(tt.djm0, tt.djm1, ehpv, ebpv);
25512 
25513         /* Form the equinox based BPN matrix, IAU 2006/2000A. */
25514         r = jauPnm06a(tt.djm0, tt.djm1);
25515 
25516         /* Extract CIP X,Y. */
25517         CelestialIntermediatePole cip = jauBpn2xy(r);
25518 
25519         /* Obtain CIO locator s. */
25520         s = jauS06(tt.djm0, tt.djm1, cip.x, cip.y);
25521 
25522         /* Earth rotation angle. */
25523         theta = jauEra00(ut1.djm0, ut1.djm1);
25524 
25525         /* TIO locator s'. */
25526         sp = jauSp00(tt.djm0, tt.djm1);
25527 
25528         /* Refraction constants A and B. */
25529         RefCos ref = jauRefco(phpa, tc, rh, wl);
25530 
25531         /* Compute the star-independent astrometry parameters. */
25532         jauApco(tt.djm0, tt.djm1, ebpv, ehpv[0], cip.x, cip.y, s, theta,
25533                 elong, phi, hm, xp, yp, sp, ref.a, ref.b, astrom);
25534 
25535         /* Equation of the origins. */
25536         eo = jauEors(r, s);
25537 
25538         return eo;
25539 
25540         /* Finished. */
25541 
25542 
25543     }
25544 
25545     /**
25546      *  For an observer whose geocentric position and velocity are known,
25547      *  prepare star-independent astrometry parameters for transformations
25548      *  between ICRS and GCRS.  The Earth ephemeris is supplied by the
25549      *  caller.
25550      *
25551      *  The parameters produced by this function are required in the space
25552      *  motion, parallax, light deflection and aberration parts of the
25553      *  astrometric transformation chain.
25554      *
25555      *<p>This function is derived from the International Astronomical Union's
25556      *  SOFA (Standards of Fundamental Astronomy) software collection.
25557      *
25558      *<p>Status:  support function.
25559      *
25560      *<!-- Given: -->
25561      *     @param date1   double        TDB as a 2-part...
25562      *     @param date2   double        ...Julian Date (Note 1)
25563      *     @param pv      double[2][3]  observer's geocentric pos/vel (m, m/s)
25564      *     @param ebpv    double[2][3]  Earth barycentric PV (au, au/day)
25565      *     @param ehp     double[3]     Earth heliocentric P (au)
25566      *
25567      *<!-- Returned:-->
25568      *     @param astrom       <b>Returned</b> star-independent astrometry parameters:
25569 
25570      *<p>Notes:
25571      * <ol>
25572      *
25573      *  <li> The TDB date date1+date2 is a Julian Date, apportioned in any
25574      *     convenient way between the two arguments.  For example,
25575      *     JD(TDB)=2450123.7 could be expressed in any of these ways, among
25576      *     others:
25577      *     <pre>
25578      *         date1          date2
25579      *
25580      *         2450123.7           0.0       (JD method)
25581      *         2451545.0       -1421.3       (J2000 method)
25582      *         2400000.5       50123.2       (MJD method)
25583      *         2450123.5           0.2       (date &amp; time method)
25584      *     </pre>
25585      *     <p>The JD method is the most natural and convenient to use in cases
25586      *     where the loss of several decimal digits of resolution is
25587      *     acceptable.  The J2000 method is best matched to the way the
25588      *     argument is handled internally and will deliver the optimum
25589      *     resolution.  The MJD method and the date &amp; time methods are both
25590      *     good compromises between resolution and convenience.  For most
25591      *     applications of this function the choice will not be at all
25592      *     critical.
25593      *
25594      *     <p>TT can be used instead of TDB without any significant impact on
25595      *     accuracy.
25596      *
25597      *  <li> All the vectors are with respect to BCRS axes.
25598      *
25599      *  <li> Providing separate arguments for (i) the observer's geocentric
25600      *     position and velocity and (ii) the Earth ephemeris is done for
25601      *     convenience in the geocentric, terrestrial and Earth orbit cases.
25602      *     For deep space applications it maybe more convenient to specify
25603      *     zero geocentric position and velocity and to supply the
25604      *     observer's position and velocity information directly instead of
25605      *     with respect to the Earth.  However, note the different units:
25606      *     m and m/s for the geocentric vectors, au and au/day for the
25607      *     heliocentric and barycentric vectors.
25608      *
25609      *  <li> In cases where the caller does not wish to provide the Earth
25610      *     ephemeris, the function iauApcs13 can be used instead of the
25611      *     present function.  This computes the Earth ephemeris using the
25612      *     SOFA function iauEpv00.
25613      *
25614      *  <li> This is one of several functions that inserts into the astrom
25615      *     structure star-independent parameters needed for the chain of
25616      *     astrometric transformations {@literal ICRS <-> GCRS <-> CIRS <-> observed.}
25617      *
25618      *     <p>The various functions support different classes of observer and
25619      *     portions of the transformation chain:
25620      *
25621      *     <pre>{@literal
25622      *          functions         observer        transformation
25623      *
25624      *       iauApcg iauApcg13    geocentric      ICRS <-> GCRS
25625      *       iauApci iauApci13    terrestrial     ICRS <-> CIRS
25626      *       iauApco iauApco13    terrestrial     ICRS <-> observed
25627      *       iauApcs iauApcs13    space           ICRS <-> GCRS
25628      *       iauAper iauAper13    terrestrial     update Earth rotation
25629      *       iauApio iauApio13    terrestrial     CIRS <-> observed
25630      *     }</pre>
25631      *     <p>Those with names ending in "13" use contemporary SOFA models to
25632      *     compute the various ephemerides.  The others accept ephemerides
25633      *     supplied by the caller.
25634      *
25635      *     <p>The transformation from ICRS to GCRS covers space motion,
25636      *     parallax, light deflection, and aberration.  From GCRS to CIRS
25637      *     comprises frame bias and precession-nutation.  From CIRS to
25638      *     observed takes account of Earth rotation, polar motion, diurnal
25639      *     aberration and parallax (unless subsumed into the {@literal ICRS <-> GCRS}
25640      *     transformation), and atmospheric refraction.
25641      *
25642      *  <li> The context structure astrom produced by this function is used by
25643      *     iauAtciq* and iauAticq*.
25644      *
25645      * </ol>
25646      *  Called:
25647      * <ul>
25648      *     <li>{@link #jauCp} copy p-vector
25649      *     <li>{@link #jauPm} modulus of p-vector
25650      *     <li>{@link #jauPn} decompose p-vector into modulus and direction
25651      *     <li>{@link #jauIr} initialize r-matrix to identity
25652      *
25653      * </ul>
25654      *@version  2013 October 9
25655      *
25656      *@since JSOFA release 20131202
25657      *
25658      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
25659      */
25660     public static void jauApcs(double date1, double date2, double pv[][],
25661             double ebpv[][], double ehp[],
25662             Astrom astrom)
25663     {
25664         /* au/d to m/s */
25665         final double AUDMS = DAU/DAYSEC;
25666 
25667         /* Light time for 1 AU (day) */
25668         final double CR = AULT/DAYSEC;
25669 
25670         int i;
25671         double dp, dv, pb[] = new double[3], vb[] = new double[3], ph[] = new double[3], v2, w;
25672 
25673 
25674         /* Time since reference epoch, years (for proper motion calculation). */
25675         astrom.pmt = ( (date1 - DJ00) + date2 ) / DJY;
25676 
25677         /* Adjust Earth ephemeris to observer. */
25678         for (i = 0; i < 3; i++) {
25679             dp = pv[0][i] / DAU;
25680             dv = pv[1][i] / AUDMS;
25681             pb[i] = ebpv[0][i] + dp;
25682             vb[i] = ebpv[1][i] + dv;
25683             ph[i] = ehp[i] + dp;
25684         }
25685 
25686         /* Barycentric position of observer (au). */
25687         jauCp(pb, astrom.eb);
25688 
25689         /* Heliocentric direction and distance (unit vector and au). */
25690         NormalizedVector nv = jauPn(ph);
25691         
25692         astrom.em = nv.r;
25693         astrom.eh = nv.u;
25694 
25695         /* Barycentric vel. in units of c, and reciprocal of Lorenz factor. */
25696         v2 = 0.0;
25697         for (i = 0; i < 3; i++) {
25698             w = vb[i] * CR;
25699             astrom.v[i] = w;
25700             v2 += w*w;
25701         }
25702         astrom.bm1 = sqrt(1.0 - v2);
25703 
25704         /* Reset the NPB matrix. */
25705         jauIr(astrom.bpn);
25706 
25707         /* Finished. */
25708 
25709 
25710     }
25711 
25712     /**
25713      *  For an observer whose geocentric position and velocity are known,
25714      *  prepare star-independent astrometry parameters for transformations
25715      *  between ICRS and GCRS.  The Earth ephemeris is from SOFA models.
25716      *
25717      *  The parameters produced by this function are required in the space
25718      *  motion, parallax, light deflection and aberration parts of the
25719      *  astrometric transformation chain.
25720      *
25721      *<p>This function is derived from the International Astronomical Union's
25722      *  SOFA (Standards of Fundamental Astronomy) software collection.
25723      *
25724      *<p>Status:  support function.
25725      *
25726      *<!-- Given: -->
25727      *     @param date1   double        TDB as a 2-part...
25728      *     @param date2   double        ...Julian Date (Note 1)
25729      *     @param pv      double[2][3]  observer's geocentric pos/vel (Note 3)
25730      *
25731      *<!-- Returned:-->
25732      *     @param astrom       <b>Returned</b> star-independent astrometry parameters:
25733      *
25734      *<p>Notes:
25735      * <ol>
25736      *
25737      *  <li> The TDB date date1+date2 is a Julian Date, apportioned in any
25738      *     convenient way between the two arguments.  For example,
25739      *     JD(TDB)=2450123.7 could be expressed in any of these ways, among
25740      *     others:
25741      *     <pre>
25742      *           date1          date2
25743      *
25744      *         2450123.7           0.0       (JD method)
25745      *         2451545.0       -1421.3       (J2000 method)
25746      *         2400000.5       50123.2       (MJD method)
25747      *         2450123.5           0.2       (date &amp; time method)
25748      *     </pre>
25749      *     <p>The JD method is the most natural and convenient to use in cases
25750      *     where the loss of several decimal digits of resolution is
25751      *     acceptable.  The J2000 method is best matched to the way the
25752      *     argument is handled internally and will deliver the optimum
25753      *     resolution.  The MJD method and the date &amp; time methods are both
25754      *     good compromises between resolution and convenience.  For most
25755      *     applications of this function the choice will not be at all
25756      *     critical.
25757      *
25758      *     <p>TT can be used instead of TDB without any significant impact on
25759      *     accuracy.
25760      *
25761      *  <li> All the vectors are with respect to BCRS axes.
25762      *
25763      *  <li> The observer's position and velocity pv are geocentric but with
25764      *     respect to BCRS axes, and in units of m and m/s.  No assumptions
25765      *     are made about proximity to the Earth, and the function can be
25766      *     used for deep space applications as well as Earth orbit and
25767      *     terrestrial.
25768      *
25769      *  <li> In cases where the caller wishes to supply his own Earth
25770      *     ephemeris, the function iauApcs can be used instead of the present
25771      *     function.
25772      *
25773      *  <li> This is one of several functions that inserts into the astrom
25774      *     structure star-independent parameters needed for the chain of
25775      *     astrometric transformations {@literal ICRS <-> GCRS <-> CIRS <-> observed.}
25776      *
25777      *     <p>The various functions support different classes of observer and
25778      *     portions of the transformation chain:
25779      *     <pre>{@literal
25780      *          functions         observer        transformation
25781      *
25782      *       iauApcg iauApcg13    geocentric      ICRS <-> GCRS
25783      *       iauApci iauApci13    terrestrial     ICRS <-> CIRS
25784      *       iauApco iauApco13    terrestrial     ICRS <-> observed
25785      *       iauApcs iauApcs13    space           ICRS <-> GCRS
25786      *       iauAper iauAper13    terrestrial     update Earth rotation
25787      *       iauApio iauApio13    terrestrial     CIRS <-> observed
25788      *     }</pre>
25789      *     <p>Those with names ending in "13" use contemporary SOFA models to
25790      *     compute the various ephemerides.  The others accept ephemerides
25791      *     supplied by the caller.
25792      *
25793      *     <p>The transformation from ICRS to GCRS covers space motion,
25794      *     parallax, light deflection, and aberration.  From GCRS to CIRS
25795      *     comprises frame bias and precession-nutation.  From CIRS to
25796      *     observed takes account of Earth rotation, polar motion, diurnal
25797      *     aberration and parallax (unless subsumed into the {@literal ICRS <-> GCRS}
25798      *     transformation), and atmospheric refraction.
25799      *
25800      *  <li> The context structure astrom produced by this function is used by
25801      *     iauAtciq* and iauAticq*.
25802      *
25803      * </ol>
25804      *  Called:
25805      * <ul>
25806      *     <li>{@link #jauEpv00} Earth position and velocity
25807      *     <li>{@link #jauApcs} astrometry parameters, ICRS-GCRS, space observer
25808      *
25809      * </ul>
25810      *@version  2013 October 9
25811      *
25812      *@since JSOFA release 20131202
25813      *
25814      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
25815      */
25816     public static void jauApcs13(double date1, double date2, double pv[][],
25817             Astrom astrom)
25818     {
25819         double ehpv[][] = new double[2][3], ebpv[][] = new double[2][3];
25820 
25821 
25822         /* Earth barycentric &amp; heliocentric position/velocity (au, au/d). */
25823         jauEpv00(date1, date2, ehpv, ebpv);
25824 
25825         /* Compute the star-independent astrometry parameters. */
25826         jauApcs(date1, date2, pv, ebpv, ehpv[0], astrom);
25827 
25828         /* Finished. */
25829 
25830 
25831     }
25832 
25833     /**
25834      *  In the star-independent astrometry parameters, update only the
25835      *  Earth rotation angle, supplied by the caller explicitly.
25836      *
25837      *<p>This function is derived from the International Astronomical Union's
25838      *  SOFA (Standards of Fundamental Astronomy) software collection.
25839      *
25840      *<p>Status:  support function.
25841      *
25842      *<!-- Given: -->
25843      *     @param theta    double       Earth rotation angle (radians, Note 2)
25844      *     @param astrom  Astrom    star-independent astrometry parameters:{@code
25845      *          pmt     double        not used
25846      *          eb      double[3]     not used
25847      *          eh      double[3]     not used
25848      *          em      double        not used
25849      *          v       double[3]     not used
25850      *          bm1     double        not used
25851      *          bpn     double[3][3]  not used
25852      *          along   double        longitude + s' (radians)
25853      *          xpl     double        not used
25854      *          ypl     double        not used
25855      *          sphi    double        not used
25856      *          cphi    double        not used
25857      *          diurab  double        not used
25858      *          eral    double        not used
25859      *          refa    double        not used
25860      *          refb    double        not used}
25861      *
25862      *<!-- Returned:-->
25863      *     astrom       <b>Returned</b> star-independent astrometry parameters:
25864     *
25865      *<p>Notes:
25866      * <ol>
25867      *
25868      *  <li> This function exists to enable sidereal-tracking applications to
25869      *     avoid wasteful recomputation of the bulk of the astrometry
25870      *     parameters:  only the Earth rotation is updated.
25871      *
25872      *  <li> For targets expressed as equinox based positions, such as
25873      *     classical geocentric apparent (RA,Dec), the supplied theta can be
25874      *     Greenwich apparent sidereal time rather than Earth rotation
25875      *     angle.
25876      *
25877      *  <li> The function iauAper13 can be used instead of the present
25878      *     function, and starts from UT1 rather than ERA itself.
25879      *
25880      *  <li> This is one of several functions that inserts into the astrom
25881      *     structure star-independent parameters needed for the chain of
25882      *     astrometric transformations {@literal ICRS <-> GCRS <-> CIRS <-> observed.}
25883      *
25884      *     <p>The various functions support different classes of observer and
25885      *     portions of the transformation chain:
25886      *     <pre>{@literal
25887      *          functions         observer        transformation
25888      *
25889      *       iauApcg iauApcg13    geocentric      ICRS <-> GCRS
25890      *       iauApci iauApci13    terrestrial     ICRS <-> CIRS
25891      *       iauApco iauApco13    terrestrial     ICRS <-> observed
25892      *       iauApcs iauApcs13    space           ICRS <-> GCRS
25893      *       iauAper iauAper13    terrestrial     update Earth rotation
25894      *       iauApio iauApio13    terrestrial     CIRS <-> observed
25895      *     }</pre>
25896      *     <p>Those with names ending in "13" use contemporary SOFA models to
25897      *     compute the various ephemerides.  The others accept ephemerides
25898      *     supplied by the caller.
25899      *
25900      *     <p>The transformation from ICRS to GCRS covers space motion,
25901      *     parallax, light deflection, and aberration.  From GCRS to CIRS
25902      *     comprises frame bias and precession-nutation.  From CIRS to
25903      *     observed takes account of Earth rotation, polar motion, diurnal
25904      *     aberration and parallax (unless subsumed into the {@literal ICRS <-> GCRS}
25905      *     transformation), and atmospheric refraction.
25906      *
25907      * </ol>
25908      *@version  2013 September 25
25909      *
25910      *@since JSOFA release 20131202
25911      *
25912      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
25913      */
25914     public static void jauAper(double theta, Astrom astrom)
25915     {
25916         astrom.eral = theta + astrom.along;
25917 
25918         /* Finished. */
25919 
25920 
25921     }
25922 
25923     /**
25924      *  In the star-independent astrometry parameters, update only the
25925      *  Earth rotation angle.  The caller provides UT1, (n.b. not UTC).
25926      *
25927      *<p>This function is derived from the International Astronomical Union's
25928      *  SOFA (Standards of Fundamental Astronomy) software collection.
25929      *
25930      *<p>Status:  support function.
25931      *
25932      *<!-- Given: -->
25933      *     @param ut11     double       UT1 as a 2-part...
25934      *     @param ut12     double       ...Julian Date (Note 1)
25935      *     @param astrom      star-independent astrometry parameters:
25936      *                    pmt     double        not used
25937      *                    eb      double[3]     not used
25938      *                    eh      double[3]     not used
25939      *                    em      double        not used
25940      *                    v       double[3]     not used
25941      *                    bm1     double        not used
25942      *                    bpn     double[3][3]  not used
25943      *                    along   double        longitude + s' (radians)
25944      *                    xpl     double        not used
25945      *                    ypl     double        not used
25946      *                    sphi    double        not used
25947      *                    cphi    double        not used
25948      *                    diurab  double        not used
25949      *                    eral    double        not used
25950      *                    refa    double        not used
25951      *                    refb    double        not used
25952      *
25953      *<!-- Returned:-->
25954      *     @param astrom       <b>Returned</b> star-independent astrometry parameters:
25955      *
25956      *<p>Notes:
25957      * <ol>
25958      *
25959      *  <li> The UT1 date (n.b. not UTC) ut11+ut12 is a Julian Date,
25960      *     apportioned in any convenient way between the arguments ut11 and
25961      *     ut12.  For example, JD(UT1)=2450123.7 could be expressed in any
25962      *     of these ways, among others:
25963      *
25964      *            <p>ut11           ut12
25965      *
25966      *         2450123.7           0.0       (JD method)
25967      *         2451545.0       -1421.3       (J2000 method)
25968      *         2400000.5       50123.2       (MJD method)
25969      *         2450123.5           0.2       (date &amp; time method)
25970      *
25971      *     <p>The JD method is the most natural and convenient to use in cases
25972      *     where the loss of several decimal digits of resolution is
25973      *     acceptable.  The J2000 and MJD methods are good compromises
25974      *     between resolution and convenience.  The date &amp; time method is
25975      *     best matched to the algorithm used:  maximum precision is
25976      *     delivered when the ut11 argument is for 0hrs UT1 on the day in
25977      *     question and the ut12 argument lies in the range 0 to 1, or vice
25978      *     versa.
25979      *
25980      *  <li> If the caller wishes to provide the Earth rotation angle itself,
25981      *     the function iauAper can be used instead.  One use of this
25982      *     technique is to substitute Greenwich apparent sidereal time and
25983      *     thereby to support equinox based transformations directly.
25984      *
25985      *  <li> This is one of several functions that inserts into the astrom
25986      *     structure star-independent parameters needed for the chain of
25987      *     astrometric transformations {@literal ICRS <-> GCRS <-> CIRS <-> observed.}
25988      *
25989      *     <p>The various functions support different classes of observer and
25990      *     portions of the transformation chain:
25991      *     <pre>{@literal
25992      *          functions         observer        transformation
25993      *
25994      *       <p>iauApcg iauApcg13    geocentric      ICRS <-> GCRS
25995      *       iauApci iauApci13    terrestrial     ICRS <-> CIRS
25996      *       iauApco iauApco13    terrestrial     ICRS <-> observed
25997      *       iauApcs iauApcs13    space           ICRS <-> GCRS
25998      *       iauAper iauAper13    terrestrial     update Earth rotation
25999      *       iauApio iauApio13    terrestrial     CIRS <-> observed
26000      *     }</pre>
26001      *     <p>Those with names ending in "13" use contemporary SOFA models to
26002      *     compute the various ephemerides.  The others accept ephemerides
26003      *     supplied by the caller.
26004      *
26005      *     <p>The transformation from ICRS to GCRS covers space motion,
26006      *     parallax, light deflection, and aberration.  From GCRS to CIRS
26007      *     comprises frame bias and precession-nutation.  From CIRS to
26008      *     observed takes account of Earth rotation, polar motion, diurnal
26009      *     aberration and parallax (unless subsumed into the {@literal ICRS <-> GCRS}
26010      *     transformation), and atmospheric refraction.
26011      *
26012      * </ol>
26013      *  Called:
26014      * <ul>
26015      *     <li>{@link #jauAper} astrometry parameters: update ERA
26016      *     <li>{@link #jauEra00} Earth rotation angle, IAU 2000
26017      *
26018      * </ul>
26019      *@version  2013 September 25
26020      *
26021      *@since JSOFA release 20131202
26022      *
26023      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
26024      */
26025     public static void jauAper13(double ut11, double ut12, Astrom astrom)
26026     {
26027         jauAper(jauEra00(ut11,ut12), astrom);
26028 
26029         /* Finished. */
26030 
26031 
26032     }
26033 
26034     /**
26035      *  For a terrestrial observer, prepare star-independent astrometry
26036      *  parameters for transformations between CIRS and observed
26037      *  coordinates.  The caller supplies the Earth orientation information
26038      *  and the refraction constants as well as the site coordinates.
26039      *
26040      *<p>This function is derived from the International Astronomical Union's
26041      *  SOFA (Standards of Fundamental Astronomy) software collection.
26042      *
26043      *<p>Status:  support function.
26044      *
26045      *<!-- Given: -->
26046      *     @param sp      double       the TIO locator s' (radians, Note 1)
26047      *     @param theta   double       Earth rotation angle (radians)
26048      *     @param elong   double       longitude (radians, east +ve, Note 2)
26049      *     @param phi     double       geodetic latitude (radians, Note 2)
26050      *     @param hm      double       height above ellipsoid (m, geodetic Note 2)
26051      *     @param xp double       polar motion coordinates (radians, Note 3)
26052      *     @param yp double       polar motion coordinates (radians, Note 3) 
26053      *     @param refa    double       refraction constant A (radians, Note 4)
26054      *     @param refb    double       refraction constant B (radians, Note 4)
26055      *
26056      *<!-- Returned:-->
26057      *     @param astrom  {@link Astrom}    <b>Returned</b> star-independent astrometry parameters:
26058      *     
26059      *<p>Notes:
26060      * <ol>
26061      *
26062      *  <li> sp, the TIO locator s', is a tiny quantity needed only by the
26063      *     most precise applications.  It can either be set to zero or
26064      *     predicted using the SOFA function iauSp00.
26065      *
26066      *  <li> The geographical coordinates are with respect to the WGS84
26067      *     reference ellipsoid.  TAKE CARE WITH THE LONGITUDE SIGN:  the
26068      *     longitude required by the present function is east-positive
26069      *     (i.e. right-handed), in accordance with geographical convention.
26070      *
26071      *  <li> The polar motion xp,yp can be obtained from IERS bulletins.  The
26072      *     values are the coordinates (in radians) of the Celestial
26073      *     Intermediate Pole with respect to the International Terrestrial
26074      *     Reference System (see IERS Conventions 2003), measured along the
26075      *     meridians 0 and 90 deg west respectively.  For many applications,
26076      *     xp and yp can be set to zero.
26077      *
26078      *     <p>Internally, the polar motion is stored in a form rotated onto the
26079      *     local meridian.
26080      *
26081      *  <li> The refraction constants refa and refb are for use in a
26082      *     dZ = A*tan(Z)+B*tan^3(Z) model, where Z is the observed
26083      *     (i.e. refracted) zenith distance and dZ is the amount of
26084      *     refraction.
26085      *
26086      *  <li> It is advisable to take great care with units, as even unlikely
26087      *     values of the input parameters are accepted and processed in
26088      *     accordance with the models used.
26089      *
26090      *  <li> In cases where the caller does not wish to provide the Earth
26091      *     rotation information and refraction constants, the function
26092      *     iauApio13 can be used instead of the present function.  This
26093      *     starts from UTC and weather readings etc. and computes suitable
26094      *     values using other SOFA functions.
26095      *
26096      *  <li> This is one of several functions that inserts into the astrom
26097      *     structure star-independent parameters needed for the chain of
26098      *     astrometric transformations {@literal ICRS <-> GCRS <-> CIRS <-> observed.}
26099      *
26100      *     <p>The various functions support different classes of observer and
26101      *     portions of the transformation chain:
26102      *<pre>{@literal
26103      *          functions         observer        transformation
26104      *
26105      *       iauApcg iauApcg13    geocentric      ICRS <-> GCRS
26106      *       iauApci iauApci13    terrestrial     ICRS <-> CIRS
26107      *       iauApco iauApco13    terrestrial     ICRS <-> observed
26108      *       iauApcs iauApcs13    space           ICRS <-> GCRS
26109      *       iauAper iauAper13    terrestrial     update Earth rotation
26110      *       iauApio iauApio13    terrestrial     CIRS <-> observed
26111      *}</pre>
26112      *     <p>Those with names ending in "13" use contemporary SOFA models to
26113      *     compute the various ephemerides.  The others accept ephemerides
26114      *     supplied by the caller.
26115      *
26116      *     <p>The transformation from ICRS to GCRS covers space motion,
26117      *     parallax, light deflection, and aberration.  From GCRS to CIRS
26118      *     comprises frame bias and precession-nutation.  From CIRS to
26119      *     observed takes account of Earth rotation, polar motion, diurnal
26120      *     aberration and parallax (unless subsumed into the {@literal ICRS <-> GCRS}
26121      *     transformation), and atmospheric refraction.
26122      *
26123      *  <li> The context structure astrom produced by this function is used by
26124      *     iauAtioq and iauAtoiq.
26125      *
26126      * </ol>
26127      *  Called:
26128      * <ul>
26129      *     <li>{@link #jauPvtob} position/velocity of terrestrial station
26130      *     <li>{@link #jauAper} astrometry parameters: update ERA
26131      *
26132      * </ul>
26133      *@version  2013 October 9
26134      *
26135      *@since JSOFA release 20131202
26136      *
26137      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
26138      * @throws JSOFAInternalError 
26139      * @throws JSOFAIllegalParameter 
26140      */
26141     public static void jauApio(double sp, double theta,
26142             double elong, double phi, double hm, double xp, double yp,
26143             double refa, double refb,
26144             Astrom astrom) throws JSOFAIllegalParameter, JSOFAInternalError
26145     {
26146         double sl, cl, pv[][];
26147 
26148 
26149         /* Longitude with adjustment for TIO locator s'. */
26150         astrom.along = elong + sp;
26151 
26152         /* Polar motion, rotated onto the local meridian. */
26153         sl = sin(astrom.along);
26154         cl = cos(astrom.along);
26155         astrom.xpl = xp*cl - yp*sl;
26156         astrom.ypl = xp*sl + yp*cl;
26157 
26158         /* Functions of latitude. */
26159         astrom.sphi = sin(phi);
26160         astrom.cphi = cos(phi);
26161 
26162         /* Observer's geocentric position and velocity (m, m/s, CIRS). */
26163         pv = jauPvtob(elong, phi, hm, xp, yp, sp, theta);
26164 
26165         /* Magnitude of diurnal aberration vector. */
26166         astrom.diurab = sqrt(pv[1][0]*pv[1][0]+pv[1][1]*pv[1][1]) / CMPS;
26167 
26168         /* Refraction constants. */
26169         astrom.refa = refa;
26170         astrom.refb = refb;
26171 
26172         /* Local Earth rotation angle. */
26173         jauAper(theta, astrom);
26174 
26175         /* Finished. */
26176 
26177 
26178     }
26179 
26180     /**
26181      *  For a terrestrial observer, prepare star-independent astrometry
26182      *  parameters for transformations between CIRS and observed
26183      *  coordinates.  The caller supplies UTC, site coordinates, ambient air
26184      *  conditions and observing wavelength.
26185      *
26186      *<p>This function is derived from the International Astronomical Union's
26187      *  SOFA (Standards of Fundamental Astronomy) software collection.
26188      *
26189      *<p>Status:  support function.
26190      *
26191      *<!-- Given: -->
26192      *     @param utc1    double       UTC as a 2-part...
26193      *     @param utc2    double       ...quasi Julian Date (Notes 1,2)
26194      *     @param dut1    double       UT1-UTC (seconds)
26195      *     @param elong   double       longitude (radians, east +ve, Note 3)
26196      *     @param phi     double       geodetic latitude (radians, Note 3)
26197      *     @param hm      double       height above ellipsoid (m, geodetic Notes 4,6)
26198      *     @param xp double       polar motion coordinates (radians, Note 5)
26199      *     @param yp double       polar motion coordinates (radians, Note 5) 
26200      *     @param phpa    double       pressure at the observer (hPa = mB, Note 6)
26201      *     @param tc      double       ambient temperature at the observer (deg C)
26202      *     @param rh      double       relative humidity at the observer (range 0-1)
26203      *     @param wl      double       wavelength (micrometers, Note 7)
26204      *
26205      *<!-- Returned:-->
26206      *     @param astrom      <b>Returned</b> star-independent astrometry parameters:
26207      *     @throws JSOFAInternalError
26208      *     @throws JSOFAIllegalParameter
26209      *                   
26210      *             int          status:   <b>Returned</b> +1 = dubious year (Note 2)
26211      *                                  0  =   <b>Returned</b> OK
26212      *                                 -1  =   <b>Returned</b> unacceptable date
26213      *
26214      *<p>Notes:
26215      * <ol>
26216      *
26217      *  <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
26218      *      convenient way between the two arguments, for example where utc1
26219      *      is the Julian Day Number and utc2 is the fraction of a day.
26220      *
26221      *      <p>However, JD cannot unambiguously represent UTC during a leap
26222      *      second unless special measures are taken.  The convention in the
26223      *      present function is that the JD day represents UTC days whether
26224      *      the length is 86399, 86400 or 86401 SI seconds.
26225      *
26226      *      <p>Applications should use the function iauDtf2d to convert from
26227      *      calendar date and time of day into 2-part quasi Julian Date, as
26228      *      it implements the leap-second-ambiguity convention just
26229      *      described.
26230      *
26231      *  <li> The warning status "dubious year" flags UTCs that predate the
26232      *      introduction of the time scale or that are too far in the future
26233      *      to be trusted.  See iauDat for further details.
26234      *
26235      *  <li> UT1-UTC is tabulated in IERS bulletins.  It increases by exactly
26236      *      one second at the end of each positive UTC leap second,
26237      *      introduced in order to keep UT1-UTC within +/- 0.9s.  n.b. This
26238      *      practice is under review, and in the future UT1-UTC may grow
26239      *      essentially without limit.
26240      *
26241      *  <li> The geographical coordinates are with respect to the WGS84
26242      *      reference ellipsoid.  TAKE CARE WITH THE LONGITUDE SIGN:  the
26243      *      longitude required by the present function is east-positive
26244      *      (i.e. right-handed), in accordance with geographical convention.
26245      *
26246      *  <li> The polar motion xp,yp can be obtained from IERS bulletins.  The
26247      *      values are the coordinates (in radians) of the Celestial
26248      *      Intermediate Pole with respect to the International Terrestrial
26249      *      Reference System (see IERS Conventions 2003), measured along the
26250      *      meridians 0 and 90 deg west respectively.  For many applications,
26251      *      xp and yp can be set to zero.
26252      *
26253      *      <p>Internally, the polar motion is stored in a form rotated onto
26254      *      the local meridian.
26255      *
26256      *  <li> If hm, the height above the ellipsoid of the observing station
26257      *      in meters, is not known but phpa, the pressure in hPa (=mB), is
26258      *      available, an adequate estimate of hm can be obtained from the
26259      *      expression
26260      *
26261      *            <p>hm = -29.3 * tsl * log ( phpa / 1013.25 );
26262      *
26263      *      <p>where tsl is the approximate sea-level air temperature in K
26264      *      (See Astrophysical Quantities, C.W.Allen, 3rd edition, section
26265      *      52).  Similarly, if the pressure phpa is not known, it can be
26266      *      estimated from the height of the observing station, hm, as
26267      *      follows:
26268      *
26269      *            <p>phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) );
26270      *
26271      *      <p>Note, however, that the refraction is nearly proportional to the
26272      *      pressure and that an accurate phpa value is important for
26273      *      precise work.
26274      *
26275      *  <li> The argument wl specifies the observing wavelength in
26276      *      micrometers.  The transition from optical to radio is assumed to
26277      *      occur at 100 micrometers (about 3000 GHz).
26278      *
26279      *  <li> It is advisable to take great care with units, as even unlikely
26280      *      values of the input parameters are accepted and processed in
26281      *      accordance with the models used.
26282      *
26283      *  <li> In cases where the caller wishes to supply his own Earth
26284      *      rotation information and refraction constants, the function
26285      *      iauApc can be used instead of the present function.
26286      *
26287      *  <li> This is one of several functions that inserts into the astrom
26288      *      structure star-independent parameters needed for the chain of
26289      *      astrometric transformations {@literal ICRS <-> GCRS <-> CIRS <-> observed.}
26290      *
26291      *      <p>The various functions support different classes of observer and
26292      *      portions of the transformation chain:
26293      *      <pre>{@literal
26294      *          functions         observer        transformation
26295      *
26296      *       iauApcg iauApcg13    geocentric      ICRS <-> GCRS
26297      *       iauApci iauApci13    terrestrial     ICRS <-> CIRS
26298      *       iauApco iauApco13    terrestrial     ICRS <-> observed
26299      *       iauApcs iauApcs13    space           ICRS <-> GCRS
26300      *       iauAper iauAper13    terrestrial     update Earth rotation
26301      *       iauApio iauApio13    terrestrial     CIRS <-> observed
26302      *      }</pre>
26303      *      <p>Those with names ending in "13" use contemporary SOFA models to
26304      *      compute the various ephemerides.  The others accept ephemerides
26305      *      supplied by the caller.
26306      *
26307      *      <p>The transformation from ICRS to GCRS covers space motion,
26308      *      parallax, light deflection, and aberration.  From GCRS to CIRS
26309      *      comprises frame bias and precession-nutation.  From CIRS to
26310      *      observed takes account of Earth rotation, polar motion, diurnal
26311      *      aberration and parallax (unless subsumed into the {@literal ICRS <-> GCRS}
26312      *      transformation), and atmospheric refraction.
26313      *
26314      *  <li> The context structure astrom produced by this function is used
26315      *      by iauAtioq and iauAtoiq.
26316      *
26317      * </ol>
26318      *  Called:
26319      * <ul>
26320      *     <li>{@link #jauUtctai} UTC to TAI
26321      *     <li>{@link #jauTaitt} TAI to TT
26322      *     <li>{@link #jauUtcut1} UTC to UT1
26323      *     <li>{@link #jauSp00} the TIO locator s', IERS 2000
26324      *     <li>{@link #jauEra00} Earth rotation angle, IAU 2000
26325      *     <li>{@link #jauRefco} refraction constants for given ambient conditions
26326      *     <li>{@link #jauApio} astrometry parameters, CIRS-observed
26327      *
26328      * </ul>
26329      *@version  2013 October 9
26330      *
26331      *@since JSOFA release 20131202
26332      *
26333      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
26334      * @throws JSOFAInternalError 
26335      * @throws JSOFAIllegalParameter 
26336      */
26337     public static void jauApio13(double utc1, double utc2, double dut1,
26338             double elong, double phi, double hm, double xp, double yp,
26339             double phpa, double tc, double rh, double wl,
26340             Astrom astrom) throws JSOFAIllegalParameter, JSOFAInternalError
26341     {
26342         double sp, theta;
26343 
26344 
26345         /* UTC to other time scales. */
26346         JulianDate tai = jauUtctai(utc1, utc2);
26347         JulianDate tt = jauTaitt(tai.djm0, tai.djm1);
26348         JulianDate ut1 = jauUtcut1(utc1, utc2, dut1);
26349 
26350         /* TIO locator s'. */
26351         sp = jauSp00(tt.djm0, tt.djm1);
26352 
26353         /* Earth rotation angle. */
26354         theta = jauEra00(ut1.djm0, ut1.djm1);
26355 
26356         /* Refraction constants A and B. */
26357         RefCos refco = jauRefco(phpa, tc, rh, wl);
26358 
26359         /* CIRS <-> observed astrometry parameters. */
26360         jauApio(sp, theta, elong, phi, hm, xp, yp, refco.a, refco.b, astrom);
26361 
26362        
26363         /* Finished. */
26364 
26365 
26366     }
26367 
26368     /**
26369      *  Transform ICRS star data, epoch J2000.0, to CIRS.
26370      *
26371      *<p>This function is derived from the International Astronomical Union's
26372      *  SOFA (Standards of Fundamental Astronomy) software collection.
26373      *
26374      *<p>Status:  support function.
26375      *
26376      *<!-- Given: -->
26377      *     @param rc      double    ICRS right ascension at J2000.0 (radians, Note 1)
26378      *     @param dc      double    ICRS declination at J2000.0 (radians, Note 1)
26379      *     @param pr      double    RA proper motion (radians/year; Note 2)
26380      *     @param pd      double    Dec proper motion (radians/year)
26381      *     @param px      double    parallax (arcsec)
26382      *     @param rv      double    radial velocity (km/s, +ve if receding)
26383      *     @param date1   double    TDB as a 2-part...
26384      *     @param date2   double    ...Julian Date (Note 3)
26385      *
26386      *<!-- Returned:-->
26387      *     @return    double*    <b>Returned</b> CIRS geocentric RA,Dec (radians)
26388      *        eo      double*    <b>Returned</b> equation of the origins (ERA-GST, Note 5)
26389      *
26390      *<p>Notes:
26391      * <ol>
26392      *
26393      *  <li> Star data for an epoch other than J2000.0 (for example from the
26394      *     Hipparcos catalog, which has an epoch of J1991.25) will require a
26395      *     preliminary call to iauPmsafe before use.
26396      *
26397      *  <li> The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt.
26398      *
26399      *  <li> The TDB date date1+date2 is a Julian Date, apportioned in any
26400      *     convenient way between the two arguments.  For example,
26401      *     JD(TDB)=2450123.8g could be expressed in any of these ways, among
26402      *     others:
26403      *
26404      *            date1          date2
26405      *
26406      *         2450123.8g           0.0       (JD method)
26407      *         2451545.0       -1421.3       (J2000 method)
26408      *         2400000.5       50123.2       (MJD method)
26409      *         2450123.5           0.2       (date &amp; time method)
26410      *
26411      *     <p>The JD method is the most natural and convenient to use in cases
26412      *     where the loss of several decimal digits of resolution is
26413      *     acceptable.  The J2000 method is best matched to the way the
26414      *     argument is handled internally and will deliver the optimum
26415      *     resolution.  The MJD method and the date &amp; time methods are both
26416      *     good compromises between resolution and convenience.  For most
26417      *     applications of this function the choice will not be at all
26418      *     critical.
26419      *
26420      *     <p>TT can be used instead of TDB without any significant impact on
26421      *     accuracy.
26422      *
26423      *  <li> The available accuracy is better than 1 milliarcsecond, limited
26424      *     mainly by the precession-nutation model that is used, namely
26425      *     IAU 2000A/2006.  Very close to solar system bodies, additional
26426      *     errors of up to several milliarcseconds can occur because of
26427      *     unmodeled light deflection;  however, the Sun's contribution is
26428      *     taken into account, to first order.  The accuracy limitations of
26429      *     the SOFA function iauEpv00 (used to compute Earth position and
26430      *     velocity) can contribute aberration errors of up to
26431      *     5 microarcseconds.  Light deflection at the Sun's limb is
26432      *     uncertain at the 0.4 mas level.
26433      *
26434      *  <li> Should the transformation to (equinox based) apparent place be
26435      *     required rather than (CIO based) intermediate place, subtract the
26436      *     equation of the origins from the returned right ascension:
26437      *     RA = RI - EO. (The iauAnp function can then be applied, as
26438      *     required, to keep the result in the conventional 0-2pi range.)
26439      *
26440      * </ol>
26441      *  Called:
26442      * <ul>
26443      *     <li>{@link #jauApci13} astrometry parameters, ICRS-CIRS, 2013
26444      *     <li>{@link #jauAtciq} quick ICRS to CIRS
26445      *
26446      * </ul>
26447      *@version  2013 October 9
26448      *
26449      *@since JSOFA release 20131202
26450      *
26451      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
26452      */
26453     public static SphericalCoordinateEO jauAtci13(double rc, double dc,
26454             double pr, double pd, double px, double rv,
26455             double date1, double date2)
26456     {
26457         /* Star-independent astrometry parameters */
26458         Astrom astrom = new Astrom();
26459 
26460 
26461         /* The transformation parameters. */
26462         double eo = jauApci13(date1, date2, astrom);
26463 
26464         /* ICRS (epoch J2000.0) to CIRS. */
26465         SphericalCoordinate co = jauAtciq(rc, dc, pr, pd, px, rv, astrom);
26466         
26467         return new SphericalCoordinateEO(co, eo);
26468         /* Finished. */
26469 
26470 
26471     }
26472 
26473     /**
26474      *  Quick ICRS, epoch J2000.0, to CIRS transformation, given precomputed
26475      *  star-independent astrometry parameters.
26476      *
26477      *  Use of this function is appropriate when efficiency is important and
26478      *  where many star positions are to be transformed for one date.  The
26479      *  star-independent parameters can be obtained by calling one of the
26480      *  functions iauApci[13], iauApcg[13], iauApco[13] or iauApcs[13].
26481      *
26482      *  If the parallax and proper motions are zero the iauAtciqz function
26483      *  can be used instead.
26484      *
26485      *<p>This function is derived from the International Astronomical Union's
26486      *  SOFA (Standards of Fundamental Astronomy) software collection.
26487      *
26488      *<p>Status:  support function.
26489      *
26490      *<!-- Given: -->
26491      *     @param rc double      ICRS RA,Dec at J2000.0 (radians)
26492      *     @param dc double      ICRS RA,Dec at J2000.0 (radians) 
26493      *     @param pr      double      RA proper motion (radians/year; Note 3)
26494      *     @param pd      double      Dec proper motion (radians/year)
26495      *     @param px      double      parallax (arcsec)
26496      *     @param rv      double      radial velocity (km/s, +ve if receding)
26497      *     @param astrom    star-independent astrometry parameters:
26498      *
26499      *<!-- Returned:-->
26500      *     @return     double      <b>Returned</b> CIRS RA,Dec (radians)
26501      *
26502      *<p>Notes:
26503      * <ol>
26504      *
26505      *  <li> All the vectors are with respect to BCRS axes.
26506      *
26507      *  <li> Star data for an epoch other than J2000.0 (for example from the
26508      *     Hipparcos catalog, which has an epoch of J1991.25) will require a
26509      *     preliminary call to iauPmsafe before use.
26510      *
26511      *  <li> The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt.
26512      *
26513      * </ol>
26514      *  Called:
26515      * <ul>
26516      *     <li>{@link #jauPmpx} proper motion and parallax
26517      *     <li>{@link #jauLdsun} light deflection by the Sun
26518      *     <li>{@link #jauAb} stellar aberration
26519      *     <li>{@link #jauRxp} product of r-matrix and pv-vector
26520      *     <li>{@link #jauC2s} p-vector to spherical
26521      *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
26522      *
26523      * </ul>
26524      *@version  2013 October 9
26525      *
26526      *@since JSOFA release 20131202
26527      *
26528      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
26529      */
26530     public static SphericalCoordinate jauAtciq(double rc, double dc,
26531             double pr, double pd, double px, double rv,
26532             Astrom astrom)
26533     {
26534         double pco[], pnat[], ppr[], pi[];
26535 
26536 
26537         /* Proper motion and parallax, giving BCRS coordinate direction. */
26538         pco = jauPmpx(rc, dc, pr, pd, px, rv, astrom.pmt, astrom.eb);
26539 
26540         /* Light deflection by the Sun, giving BCRS natural direction. */
26541         pnat = jauLdsun(pco, astrom.eh, astrom.em);
26542 
26543         /* Aberration, giving GCRS proper direction. */
26544         ppr = jauAb(pnat, astrom.v, astrom.em, astrom.bm1);
26545 
26546         /* Bias-precession-nutation, giving CIRS proper direction. */
26547         pi = jauRxp(astrom.bpn, ppr);
26548 
26549         /* CIRS RA,Dec. */
26550         SphericalCoordinate co = jauC2s(pi);
26551         co.alpha = jauAnp(co.alpha);
26552 
26553         return co;
26554         /* Finished. */
26555 
26556 
26557     }
26558 
26559     /**
26560      *  Quick ICRS, epoch J2000.0, to CIRS transformation, given precomputed
26561      *  star-independent astrometry parameters plus a list of light-
26562      *  deflecting bodies.
26563      *
26564      *  Use of this function is appropriate when efficiency is important and
26565      *  where many star positions are to be transformed for one date.  The
26566      *  star-independent parameters can be obtained by calling one of the
26567      *  functions iauApci[13], iauApcg[13], iauApco[13] or iauApcs[13].
26568      *
26569      *
26570      *  If the only light-deflecting body to be taken into account is the
26571      *  Sun, the iauAtciq function can be used instead.  If in addition the
26572      *  parallax and proper motions are zero, the iauAtciqz function can be
26573      *  used.
26574      *
26575      *<p>This function is derived from the International Astronomical Union's
26576      *  SOFA (Standards of Fundamental Astronomy) software collection.
26577      *
26578      *<p>Status:  support function.
26579      *
26580      *<!-- Given: -->
26581      *     @param rc double        ICRS RA,Dec at J2000.0 (radians)
26582      *     @param dc double        ICRS RA,Dec at J2000.0 (radians) 
26583      *     @param pr      double        RA proper motion (radians/year; Note 3)
26584      *     @param pd      double        Dec proper motion (radians/year)
26585      *     @param px      double        parallax (arcsec)
26586      *     @param rv      double        radial velocity (km/s, +ve if receding)
26587      *     @param astrom      star-independent astrometry parameters:
26588      *      @param n      int            number of bodies (Note 3)
26589      *      @param b      jauLDBODY[n]  data for each of the n bodies (Notes 3,4):
26590      *
26591      *<!-- Returned:-->
26592      *     @return ri,di    double      <b>Returned</b> CIRS RA,Dec (radians)
26593      *
26594      *<p>Notes:
26595      * <ol>
26596      *
26597      *  <li> Star data for an epoch other than J2000.0 (for example from the
26598      *     Hipparcos catalog, which has an epoch of J1991.25) will require a
26599      *     preliminary call to iauPmsafe before use.
26600      *
26601      *  <li> The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt.
26602      *
26603      *  <li> The struct b contains n entries, one for each body to be
26604      *     considered.  If n = 0, no gravitational light deflection will be
26605      *     applied, not even for the Sun.
26606      *
26607      *  <li> The struct b should include an entry for the Sun as well as for
26608      *     any planet or other body to be taken into account.  The entries
26609      *     should be in the order in which the light passes the body.
26610      *
26611      *  <li> In the entry in the b struct for body i, the mass parameter
26612      *     b[i].bm can, as required, be adjusted in order to allow for such
26613      *     effects as quadrupole field.
26614      *
26615      *  <li> The deflection limiter parameter b[i].dl is phi^2/2, where phi is
26616      *     the angular separation (in radians) between star and body at
26617      *     which limiting is applied.  As phi shrinks below the chosen
26618      *     threshold, the deflection is artificially reduced, reaching zero
26619      *     for phi = 0.   Example values suitable for a terrestrial
26620      *     observer, together with masses, are as follows:
26621      *     <pre>
26622      *        body i     b[i].bm        b[i].dl
26623      *
26624      *        Sun        1.0            6e-6
26625      *        Jupiter    0.00095435     3e-9
26626      *        Saturn     0.00028574     3e-10
26627      *     </pre>
26628      *  <li> For efficiency, validation of the contents of the b array is
26629      *     omitted.  The supplied masses must be greater than zero, the
26630      *     position and velocity vectors must be right, and the deflection
26631      *     limiter greater than zero.
26632      *
26633      * </ol>
26634      *  Called:
26635      * <ul>
26636      *     <li>{@link #jauPmpx} proper motion and parallax
26637      *     <li>{@link #jauLdn} light deflection by n bodies
26638      *     <li>{@link #jauAb} stellar aberration
26639      *     <li>{@link #jauRxp} product of r-matrix and pv-vector
26640      *     <li>{@link #jauC2s} p-vector to spherical
26641      *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
26642      *
26643      * </ul>
26644      *@version  2013 October 9
26645      *
26646      *@since JSOFA release 20131202
26647      *
26648      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
26649      */
26650     public static SphericalCoordinate jauAtciqn(double rc, double dc, double pr, double pd,
26651             double px, double rv, Astrom astrom,
26652             int n, Ldbody b[])
26653     {
26654         double pco[], pnat[], ppr[] = new double[3], pi[] = new double[3];
26655 
26656 
26657         /* Proper motion and parallax, giving BCRS coordinate direction. */
26658         pco = jauPmpx(rc, dc, pr, pd, px, rv, astrom.pmt, astrom.eb);
26659 
26660         /* Light deflection, giving BCRS natural direction. */
26661         pnat = jauLdn(n, b, astrom.eb, pco);
26662 
26663         /* Aberration, giving GCRS proper direction. */
26664         ppr = jauAb(pnat, astrom.v, astrom.em, astrom.bm1);
26665 
26666         /* Bias-precession-nutation, giving CIRS proper direction. */
26667         pi = jauRxp(astrom.bpn, ppr);
26668 
26669         /* CIRS RA,Dec. */
26670         SphericalCoordinate co = jauC2s(pi);
26671         co.alpha = jauAnp(co.alpha);
26672 
26673         return co;
26674         /* Finished. */
26675 
26676 
26677     }
26678 
26679     /**
26680      *  Quick ICRS to CIRS transformation, given precomputed star-
26681      *  independent astrometry parameters, and assuming zero parallax and
26682      *  proper motion.
26683      *
26684      *  Use of this function is appropriate when efficiency is important and
26685      *  where many star positions are to be transformed for one date.  The
26686      *  star-independent parameters can be obtained by calling one of the
26687      *  functions iauApci[13], iauApcg[13], iauApco[13] or iauApcs[13].
26688      *
26689      *  The corresponding function for the case of non-zero parallax and
26690      *  proper motion is iauAtciq.
26691      *
26692      *<p>This function is derived from the International Astronomical Union's
26693      *  SOFA (Standards of Fundamental Astronomy) software collection.
26694      *
26695      *<p>Status:  support function.
26696      *
26697      *<!-- Given: -->
26698      *     @param rc double      ICRS astrometric RA,Dec (radians)
26699      *     @param dc double      ICRS astrometric RA,Dec (radians) 
26700      *     @param astrom    star-independent astrometry parameters:
26701      *
26702      *<!-- Returned:-->
26703      *     @return ri,di   double       <b>Returned</b> CIRS RA,Dec (radians)
26704      *
26705      *  Note:
26706      *
26707      *     @return All  the   <b>Returned</b> vectors are with respect to BCRS axes.
26708      *
26709      *<p>References:
26710      * <ul>
26711      *
26712      * <li> Urban, S. &amp; Seidelmann, P. K. (eds), Explanatory Supplement to
26713      *     the Astronomical Almanac, 3rd ed., University Science Books
26714      *     (2013).
26715      *
26716      * <li> Klioner, Sergei A., "A practical relativistic model for micro-
26717      *     arcsecond astrometry in space", Astr. J. 125, 1580-1597 (2003).
26718      *
26719      * </ul>
26720      *  Called:
26721      * <ul>
26722      *     <li>{@link #jauS2c} spherical coordinates to unit vector
26723      *     <li>{@link #jauLdsun} light deflection due to Sun
26724      *     <li>{@link #jauAb} stellar aberration
26725      *     <li>{@link #jauRxp} product of r-matrix and p-vector
26726      *     <li>{@link #jauC2s} p-vector to spherical
26727      *     <li>{@link #jauAnp} normalize angle into range +/- pi
26728      *
26729      * </ul>
26730      *@version  2013 October 9
26731      *
26732      *@since JSOFA release 20131202
26733      *
26734      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
26735      */
26736     public static SphericalCoordinate jauAtciqz(double rc, double dc, Astrom astrom)
26737     {
26738         double pco[], pnat[], ppr[] = new double[3], pi[];
26739 
26740 
26741         /* BCRS coordinate direction (unit vector). */
26742         pco = jauS2c(rc, dc);
26743 
26744         /* Light deflection by the Sun, giving BCRS natural direction. */
26745         pnat = jauLdsun(pco, astrom.eh, astrom.em);
26746 
26747         /* Aberration, giving GCRS proper direction. */
26748         ppr = jauAb(pnat, astrom.v, astrom.em, astrom.bm1);
26749 
26750         /* Bias-precession-nutation, giving CIRS proper direction. */
26751         pi = jauRxp(astrom.bpn, ppr);
26752 
26753         /* CIRS RA,Dec. */
26754         SphericalCoordinate co = jauC2s(pi);
26755         co.alpha = jauAnp(co.alpha);
26756 
26757         return co;
26758         /* Finished. */
26759 
26760 
26761     }
26762 
26763     /**
26764      *  ICRS RA,Dec to observed place.  The caller supplies UTC, site
26765      *  coordinates, ambient air conditions and observing wavelength.
26766      *
26767      *  SOFA models are used for the Earth ephemeris, bias-precession-
26768      *  nutation, Earth orientation and refraction.
26769      *
26770      *<p>This function is derived from the International Astronomical Union's
26771      *  SOFA (Standards of Fundamental Astronomy) software collection.
26772      *
26773      *<p>Status:  support function.
26774      *
26775      *<!-- Given: -->
26776      *     @param rc double    ICRS right ascension at J2000.0 (radians, Note 1)
26777      *     @param dc double    ICRS right ascension at J2000.0 (radians, Note 1) 
26778      *     @param pr      double    RA proper motion (radians/year; Note 2)
26779      *     @param pd      double    Dec proper motion (radians/year)
26780      *     @param px      double    parallax (arcsec)
26781      *     @param rv      double    radial velocity (km/s, +ve if receding)
26782      *     @param utc1    double    UTC as a 2-part...
26783      *     @param utc2    double    ...quasi Julian Date (Notes 3-4)
26784      *     @param dut1    double    UT1-UTC (seconds, Note 5)
26785      *     @param elong   double    longitude (radians, east +ve, Note 6)
26786      *     @param phi     double    latitude (geodetic, radians, Note 6)
26787      *     @param hm      double    height above ellipsoid (m, geodetic, Notes 6,8)
26788      *     @param xp double    polar motion coordinates (radians, Note 7)
26789      *     @param yp double    polar motion coordinates (radians, Note 7) 
26790      *     @param phpa    double    pressure at the observer (hPa = mB, Note 8)
26791      *     @param tc      double    ambient temperature at the observer (deg C)
26792      *     @param rh      double    relative humidity at the observer (range 0-1)
26793      *     @param wl      double    wavelength (micrometers, Note 9)
26794      *
26795      *<!-- Returned:-->
26796      *     @return aob     double*    <b>Returned</b> observed azimuth (radians: N=0,E=90)
26797      *             zob     double*    <b>Returned</b> observed zenith distance (radians)
26798      *             hob     double*    <b>Returned</b> observed hour angle (radians)
26799      *             dob     double*    <b>Returned</b> observed declination (radians)
26800      *             rob     double*    <b>Returned</b> observed right ascension (CIO-based, radians)
26801      *             eo      double*    <b>Returned</b> equation of the origins (ERA-GST)
26802      *
26803      *  @throws JSOFAInternalError
26804      *  @throws JSOFAIllegalParameter
26805      *             int       status:   <b>Returned</b> +1 = dubious year (Note 4)
26806      *                               0  =   <b>Returned</b> OK
26807      *                              -1  =   <b>Returned</b> unacceptable date
26808      *
26809      *<p>Notes:
26810      * <ol>
26811      *
26812      *  <li> Star data for an epoch other than J2000.0 (for example from the
26813      *      Hipparcos catalog, which has an epoch of J1991.25) will require
26814      *      a preliminary call to iauPmsafe before use.
26815      *
26816      *  <li> The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt.
26817      *
26818      *  <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
26819      *      convenient way between the two arguments, for example where utc1
26820      *      is the Julian Day Number and utc2 is the fraction of a day.
26821      *
26822      *      <p>However, JD cannot unambiguously represent UTC during a leap
26823      *      second unless special measures are taken.  The convention in the
26824      *      present function is that the JD day represents UTC days whether
26825      *      the length is 86399, 86400 or 86401 SI seconds.
26826      *
26827      *      <p>Applications should use the function iauDtf2d to convert from
26828      *      calendar date and time of day into 2-part quasi Julian Date, as
26829      *      it implements the leap-second-ambiguity convention just
26830      *      described.
26831      *
26832      *  <li> The warning status "dubious year" flags UTCs that predate the
26833      *      introduction of the time scale or that are too far in the
26834      *      future to be trusted.  See iauDat for further details.
26835      *
26836      *  <li> UT1-UTC is tabulated in IERS bulletins.  It increases by exactly
26837      *      one second at the end of each positive UTC leap second,
26838      *      introduced in order to keep UT1-UTC within +/- 0.9s.  n.b. This
26839      *      practice is under review, and in the future UT1-UTC may grow
26840      *      essentially without limit.
26841      *
26842      *  <li> The geographical coordinates are with respect to the WGS84
26843      *      reference ellipsoid.  TAKE CARE WITH THE LONGITUDE SIGN:  the
26844      *      longitude required by the present function is east-positive
26845      *      (i.e. right-handed), in accordance with geographical convention.
26846      *
26847      *  <li> The polar motion xp,yp can be obtained from IERS bulletins.  The
26848      *      values are the coordinates (in radians) of the Celestial
26849      *      Intermediate Pole with respect to the International Terrestrial
26850      *      Reference System (see IERS Conventions 2003), measured along the
26851      *      meridians 0 and 90 deg west respectively.  For many
26852      *      applications, xp and yp can be set to zero.
26853      *
26854      *  <li> If hm, the height above the ellipsoid of the observing station
26855      *      in meters, is not known but phpa, the pressure in hPa (=mB),
26856      *      is available, an adequate estimate of hm can be obtained from
26857      *      the expression
26858      *
26859      *            <p>hm = -29.3 * tsl * log ( phpa / 1013.25 );
26860      *
26861      *      <p>where tsl is the approximate sea-level air temperature in K
26862      *      (See Astrophysical Quantities, C.W.Allen, 3rd edition, section
26863      *      52).  Similarly, if the pressure phpa is not known, it can be
26864      *      estimated from the height of the observing station, hm, as
26865      *      follows:
26866      *
26867      *            <p>phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) );
26868      *
26869      *      <p>Note, however, that the refraction is nearly proportional to
26870      *      the pressure and that an accurate phpa value is important for
26871      *      precise work.
26872      *
26873      *  <li> The argument wl specifies the observing wavelength in
26874      *      micrometers.  The transition from optical to radio is assumed to
26875      *      occur at 100 micrometers (about 3000 GHz).
26876      *
26877      *  <li> The accuracy of the result is limited by the corrections for
26878      *      refraction, which use a simple A*tan(z) + B*tan^3(z) model.
26879      *      Providing the meteorological parameters are known accurately and
26880      *      there are no gross local effects, the predicted observed
26881      *      coordinates should be within 0.05 arcsec (optical) or 1 arcsec
26882      *      (radio) for a zenith distance of less than 70 degrees, better
26883      *      than 30 arcsec (optical or radio) at 85 degrees and better
26884      *      than 20 arcmin (optical) or 30 arcmin (radio) at the horizon.
26885      *
26886      *      <p>Without refraction, the complementary functions iauAtco13 and
26887      *      iauAtoc13 are self-consistent to better than 1 microarcsecond
26888      *      all over the celestial sphere.  With refraction included,
26889      *      consistency falls off at high zenith distances, but is still
26890      *      better than 0.05 arcsec at 85 degrees.
26891      *
26892      *  <li> "Observed" Az,ZD means the position that would be seen by a
26893      *      perfect geodetically aligned theodolite.  (Zenith distance is
26894      *      used rather than altitude in order to reflect the fact that no
26895      *      allowance is made for depression of the horizon.)  This is
26896      *      related to the observed HA,Dec via the standard rotation, using
26897      *      the geodetic latitude (corrected for polar motion), while the
26898      *      observed HA and RA are related simply through the Earth rotation
26899      *      angle and the site longitude.  "Observed" RA,Dec or HA,Dec thus
26900      *      means the position that would be seen by a perfect equatorial
26901      *      with its polar axis aligned to the Earth's axis of rotation.
26902      *
26903      *  <li> It is advisable to take great care with units, as even unlikely
26904      *      values of the input parameters are accepted and processed in
26905      *      accordance with the models used.
26906      *
26907      * </ol>
26908      *  Called:
26909      * <ul>
26910      *     <li>{@link #jauApco13} astrometry parameters, ICRS-observed, 2013
26911      *     <li>{@link #jauAtciq} quick ICRS to CIRS
26912      *     <li>{@link #jauAtioq} quick ICRS to observed
26913      *
26914      * </ul>
26915      *@version  2013 October 9
26916      *
26917      *@since JSOFA release 20131202
26918      *
26919      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
26920      * @throws JSOFAInternalError 
26921      * @throws JSOFAIllegalParameter 
26922      */
26923     public static ObservedPositionEO jauAtco13(double rc, double dc,
26924             double pr, double pd, double px, double rv,
26925             double utc1, double utc2, double dut1,
26926             double elong, double phi, double hm, double xp, double yp,
26927             double phpa, double tc, double rh, double wl) throws JSOFAIllegalParameter, JSOFAInternalError
26928     {
26929         Astrom astrom = new Astrom();
26930 
26931 
26932         /* Star-independent astrometry parameters. */
26933         double eo = jauApco13(utc1, utc2, dut1, elong, phi, hm, xp, yp,
26934                 phpa, tc, rh, wl, astrom);
26935 
26936         /* Transform ICRS to CIRS. */
26937         SphericalCoordinate co = jauAtciq(rc, dc, pr, pd, px, rv, astrom);
26938 
26939         /* Transform CIRS to observed. */
26940         ObservedPosition obs = jauAtioq(co.alpha, co.delta, astrom);
26941 
26942       
26943         return new ObservedPositionEO(obs, eo);
26944         
26945         /* Finished. */
26946 
26947 
26948     }
26949 
26950     /**
26951      *  Transform star RA,Dec from geocentric CIRS to ICRS astrometric.
26952      *
26953      *<p>This function is derived from the International Astronomical Union's
26954      *  SOFA (Standards of Fundamental Astronomy) software collection.
26955      *
26956      *<p>Status:  support function.
26957      *
26958      *<!-- Given: -->
26959      *     @param ri double   CIRS geocentric RA,Dec (radians)
26960      *     @param di double   CIRS geocentric RA,Dec (radians) 
26961      *     @param date1   double   TDB as a 2-part...
26962      *     @param date2   double   ...Julian Date (Note 1)
26963      *
26964      *<!-- Returned:-->
26965      *     @return rc,dc   double    <b>Returned</b> ICRS astrometric RA,Dec (radians)
26966      *      eo      double    <b>Returned</b> equation of the origins (ERA-GST, Note 4)
26967      *
26968      *<p>Notes:
26969      * <ol>
26970      *
26971      *  <li> The TDB date date1+date2 is a Julian Date, apportioned in any
26972      *     convenient way between the two arguments.  For example,
26973      *     JD(TDB)=2450123.7 could be expressed in any of these ways, among
26974      *     others:
26975      *
26976      *            date1          date2
26977      *
26978      *         2450123.7           0.0       (JD method)
26979      *         2451545.0       -1421.3       (J2000 method)
26980      *         2400000.5       50123.2       (MJD method)
26981      *         2450123.5           0.2       (date &amp; time method)
26982      *
26983      *     <p>The JD method is the most natural and convenient to use in cases
26984      *     where the loss of several decimal digits of resolution is
26985      *     acceptable.  The J2000 method is best matched to the way the
26986      *     argument is handled internally and will deliver the optimum
26987      *     resolution.  The MJD method and the date &amp; time methods are both
26988      *     good compromises between resolution and convenience.  For most
26989      *     applications of this function the choice will not be at all
26990      *     critical.
26991      *
26992      *     <p>TT can be used instead of TDB without any significant impact on
26993      *     accuracy.
26994      *
26995      *  <li> Iterative techniques are used for the aberration and light
26996      *     deflection corrections so that the functions iauAtic13 (or
26997      *     iauAticq) and iauAtci13 (or iauAtciq) are accurate inverses;
26998      *     even at the edge of the Sun's disk the discrepancy is only about
26999      *     1 nanoarcsecond.
27000      *
27001      *  <li> The available accuracy is better than 1 milliarcsecond, limited
27002      *     mainly by the precession-nutation model that is used, namely
27003      *     IAU 2000A/2006.  Very close to solar system bodies, additional
27004      *     errors of up to several milliarcseconds can occur because of
27005      *     unmodeled light deflection;  however, the Sun's contribution is
27006      *     taken into account, to first order.  The accuracy limitations of
27007      *     the SOFA function iauEpv00 (used to compute Earth position and
27008      *     velocity) can contribute aberration errors of up to
27009      *     5 microarcseconds.  Light deflection at the Sun's limb is
27010      *     uncertain at the 0.4 mas level.
27011      *
27012      *  <li> Should the transformation to (equinox based) J2000.0 mean place
27013      *     be required rather than (CIO based) ICRS coordinates, subtract the
27014      *     equation of the origins from the returned right ascension:
27015      *     RA = RI - EO.  (The iauAnp function can then be applied, as
27016      *     required, to keep the result in the conventional 0-2pi range.)
27017      *
27018      * </ol>
27019      *  Called:
27020      * <ul>
27021      *     <li>{@link #jauApci13} astrometry parameters, ICRS-CIRS, 2013
27022      *     <li>{@link #jauAticq} quick CIRS to ICRS astrometric
27023      *
27024      * </ul>
27025      *@version  2013 October 9
27026      *
27027      *@since JSOFA release 20131202
27028      *
27029      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
27030      */
27031     public static SphericalCoordinateEO jauAtic13(double ri, double di, double date1, double date2)
27032     {
27033         /* Star-independent astrometry parameters */
27034         Astrom astrom = new Astrom();
27035 
27036 
27037         /* Star-independent astrometry parameters. */
27038         double eo = jauApci13(date1, date2, astrom);
27039 
27040         /* CIRS to ICRS astrometric. */
27041         SphericalCoordinate co = jauAticq(ri, di, astrom);
27042 
27043         return new SphericalCoordinateEO(co,eo);
27044         /* Finished. */
27045 
27046 
27047     }
27048 
27049     /**
27050      *  Quick CIRS RA,Dec to ICRS astrometric place, given the star-
27051      *  independent astrometry parameters.
27052      *
27053      *  Use of this function is appropriate when efficiency is important and
27054      *  where many star positions are all to be transformed for one date.
27055      *  The star-independent astrometry parameters can be obtained by
27056      *  calling one of the functions iauApci[13], iauApcg[13], iauApco[13]
27057      *  or iauApcs[13].
27058      *
27059      *<p>This function is derived from the International Astronomical Union's
27060      *  SOFA (Standards of Fundamental Astronomy) software collection.
27061      *
27062      *<p>Status:  support function.
27063      *
27064      *<!-- Given: -->
27065      *     @param ri double      CIRS RA,Dec (radians)
27066      *     @param di double      CIRS RA,Dec (radians) 
27067      *     @param astrom    star-independent astrometry parameters:
27068      *
27069      *<!-- Returned:-->
27070      *     @return rc,dc   double       <b>Returned</b> ICRS astrometric RA,Dec (radians)
27071      *
27072      *<p>Notes:
27073      * <ol>
27074      *
27075      *  <li> Only the Sun is taken into account in the light deflection
27076      *     correction.
27077      *
27078      *  <li> Iterative techniques are used for the aberration and light
27079      *     deflection corrections so that the functions iauAtic13 (or
27080      *     iauAticq) and iauAtci13 (or iauAtciq) are accurate inverses;
27081      *     even at the edge of the Sun's disk the discrepancy is only about
27082      *     1 nanoarcsecond.
27083      *
27084      * </ol>
27085      *  Called:
27086      * <ul>
27087      *     <li>{@link #jauS2c} spherical coordinates to unit vector
27088      *     <li>{@link #jauTrxp} product of transpose of r-matrix and p-vector
27089      *     <li>{@link #jauZp} zero p-vector
27090      *     <li>{@link #jauAb} stellar aberration
27091      *     <li>{@link #jauLdsun} light deflection by the Sun
27092      *     <li>{@link #jauC2s} p-vector to spherical
27093      *     <li>{@link #jauAnp} normalize angle into range +/- pi
27094      *
27095      * </ul>
27096      *@version  2013 October 9
27097      *
27098      *@since JSOFA release 20131202
27099      *
27100      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
27101      */
27102     public static SphericalCoordinate  jauAticq(double ri, double di, Astrom astrom )
27103     {
27104         int j, i;
27105         double pi[] , ppr[], pnat[] = new double[3], pco[] = new double[3], w, d[] = new double[3], 
27106                 before[] = new double[3], r2, r,
27107                 after[];
27108 
27109 
27110         /* CIRS RA,Dec to Cartesian. */
27111         pi = jauS2c(ri, di);
27112 
27113         /* Bias-precession-nutation, giving GCRS proper direction. */
27114         ppr = jauTrxp(astrom.bpn, pi);
27115 
27116         /* Aberration, giving GCRS natural direction. */
27117         jauZp(d);
27118         for (j = 0; j < 2; j++) {
27119             r2 = 0.0;
27120             for (i = 0; i < 3; i++) {
27121                 w = ppr[i] - d[i];
27122                 before[i] = w;
27123                 r2 += w*w;
27124             }
27125             r = sqrt(r2);
27126             for (i = 0; i < 3; i++) {
27127                 before[i] /= r;
27128             }
27129             after = jauAb(before, astrom.v, astrom.em, astrom.bm1);
27130             r2 = 0.0;
27131             for (i = 0; i < 3; i++) {
27132                 d[i] = after[i] - before[i];
27133                 w = ppr[i] - d[i];
27134                 pnat[i] = w;
27135                 r2 += w*w;
27136             }
27137             r = sqrt(r2);
27138             for (i = 0; i < 3; i++) {
27139                 pnat[i] /= r;
27140             }
27141         }
27142 
27143         /* Light deflection by the Sun, giving BCRS coordinate direction. */
27144         jauZp(d);
27145         for (j = 0; j < 5; j++) {
27146             r2 = 0.0;
27147             for (i = 0; i < 3; i++) {
27148                 w = pnat[i] - d[i];
27149                 before[i] = w;
27150                 r2 += w*w;
27151             }
27152             r = sqrt(r2);
27153             for (i = 0; i < 3; i++) {
27154                 before[i] /= r;
27155             }
27156             after = jauLdsun(before, astrom.eh, astrom.em);
27157             r2 = 0.0;
27158             for (i = 0; i < 3; i++) {
27159                 d[i] = after[i] - before[i];
27160                 w = pnat[i] - d[i];
27161                 pco[i] = w;
27162                 r2 += w*w;
27163             }
27164             r = sqrt(r2);
27165             for (i = 0; i < 3; i++) {
27166                 pco[i] /= r;
27167             }
27168         }
27169 
27170         /* ICRS astrometric RA,Dec. */
27171         SphericalCoordinate co = jauC2s(pco);
27172         co.alpha = jauAnp(co.alpha);
27173 
27174         return co;
27175         /* Finished. */
27176 
27177 
27178     }
27179 
27180     /**
27181      *  Quick CIRS to ICRS astrometric place transformation, given the star-
27182      *  independent astrometry parameters plus a list of light-deflecting
27183      *  bodies.
27184      *
27185      *  Use of this function is appropriate when efficiency is important and
27186      *  where many star positions are all to be transformed for one date.
27187      *  The star-independent astrometry parameters can be obtained by
27188      *  calling one of the functions iauApci[13], iauApcg[13], iauApco[13]
27189      *  or iauApcs[13].
27190      *
27191      *  If the only light-deflecting body to be taken into account is the
27192      *  Sun, the iauAticq function can be used instead.
27193      *
27194      *<p>This function is derived from the International Astronomical Union's
27195      *  SOFA (Standards of Fundamental Astronomy) software collection.
27196      *
27197      *<p>Status:  support function.
27198      *
27199      *<!-- Given: -->
27200      *     @param ri double       CIRS RA,Dec (radians)
27201      *     @param di double       CIRS RA,Dec (radians) 
27202      *     @param astrom     star-independent astrometry parameters:
27203      *
27204      *<!-- Returned:-->
27205      *     @return rc,dc   double       <b>Returned</b> ICRS astrometric RA,Dec (radians)
27206      *
27207      *<p>Notes:
27208      * <ol>
27209      *
27210      *  <li> Iterative techniques are used for the aberration and light
27211      *     deflection corrections so that the functions iauAticqn and
27212      *     iauAtciqn are accurate inverses; even at the edge of the Sun's
27213      *     disk the discrepancy is only about 1 nanoarcsecond.
27214      *
27215      *  <li> If the only light-deflecting body to be taken into account is the
27216      *     Sun, the iauAticq function can be used instead.
27217      *
27218      *  <li> The struct b contains n entries, one for each body to be
27219      *     considered.  If n = 0, no gravitational light deflection will be
27220      *     applied, not even for the Sun.
27221      *
27222      *  <li> The struct b should include an entry for the Sun as well as for
27223      *     any planet or other body to be taken into account.  The entries
27224      *     should be in the order in which the light passes the body.
27225      *
27226      *  <li> In the entry in the b struct for body i, the mass parameter
27227      *     b[i].bm can, as required, be adjusted in order to allow for such
27228      *     effects as quadrupole field.
27229      *
27230      *  <li> The deflection limiter parameter b[i].dl is phi^2/2, where phi is
27231      *     the angular separation (in radians) between star and body at
27232      *     which limiting is applied.  As phi shrinks below the chosen
27233      *     threshold, the deflection is artificially reduced, reaching zero
27234      *     for phi = 0.   Example values suitable for a terrestrial
27235      *     observer, together with masses, are as follows:
27236      *
27237      *        <p>body i     b[i].bm        b[i].dl
27238      *
27239      *        <p>Sun        1.0            6e-6
27240      *        Jupiter    0.00095435     3e-9
27241      *        Saturn     0.00028574     3e-10
27242      *
27243      *  <li> For efficiency, validation of the contents of the b array is
27244      *     omitted.  The supplied masses must be greater than zero, the
27245      *     position and velocity vectors must be right, and the deflection
27246      *     limiter greater than zero.
27247      *
27248      * </ol>
27249      *  Called:
27250      * <ul>
27251      *     <li>{@link #jauS2c} spherical coordinates to unit vector
27252      *     <li>{@link #jauTrxp} product of transpose of r-matrix and p-vector
27253      *     <li>{@link #jauZp} zero p-vector
27254      *     <li>{@link #jauAb} stellar aberration
27255      *     <li>{@link #jauLdn} light deflection by n bodies
27256      *     <li>{@link #jauC2s} p-vector to spherical
27257      *     <li>{@link #jauAnp} normalize angle into range +/- pi
27258      *
27259      * </ul>
27260      *@version  2013 October 9
27261      *
27262      *@since JSOFA release 20131202
27263      *
27264      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
27265      */
27266     public static SphericalCoordinate jauAticqn(double ri, double di, Astrom astrom,
27267             int n, Ldbody b[])
27268     {
27269         int j, i;
27270         double pi[], ppr[], pnat[] = new double[3], pco[] = new double[3], w, d[] = new double[3], before[] = new double[3], r2, r,
27271                 after[];
27272 
27273 
27274         /* CIRS RA,Dec to Cartesian. */
27275         pi = jauS2c(ri, di);
27276 
27277         /* Bias-precession-nutation, giving GCRS proper direction. */
27278         ppr = jauTrxp(astrom.bpn, pi);
27279 
27280         /* Aberration, giving GCRS natural direction. */
27281         jauZp(d);
27282         for (j = 0; j < 2; j++) {
27283             r2 = 0.0;
27284             for (i = 0; i < 3; i++) {
27285                 w = ppr[i] - d[i];
27286                 before[i] = w;
27287                 r2 += w*w;
27288             }
27289             r = sqrt(r2);
27290             for (i = 0; i < 3; i++) {
27291                 before[i] /= r;
27292             }
27293             after = jauAb(before, astrom.v, astrom.em, astrom.bm1);
27294             r2 = 0.0;
27295             for (i = 0; i < 3; i++) {
27296                 d[i] = after[i] - before[i];
27297                 w = ppr[i] - d[i];
27298                 pnat[i] = w;
27299                 r2 += w*w;
27300             }
27301             r = sqrt(r2);
27302             for (i = 0; i < 3; i++) {
27303                 pnat[i] /= r;
27304             }
27305         }
27306 
27307         /* Light deflection, giving BCRS coordinate direction. */
27308         jauZp(d);
27309         for (j = 0; j < 5; j++) {
27310             r2 = 0.0;
27311             for (i = 0; i < 3; i++) {
27312                 w = pnat[i] - d[i];
27313                 before[i] = w;
27314                 r2 += w*w;
27315             }
27316             r = sqrt(r2);
27317             for (i = 0; i < 3; i++) {
27318                 before[i] /= r;
27319             }
27320             after = jauLdn(n, b, astrom.eb, before);
27321             r2 = 0.0;
27322             for (i = 0; i < 3; i++) {
27323                 d[i] = after[i] - before[i];
27324                 w = pnat[i] - d[i];
27325                 pco[i] = w;
27326                 r2 += w*w;
27327             }
27328             r = sqrt(r2);
27329             for (i = 0; i < 3; i++) {
27330                 pco[i] /= r;
27331             }
27332         }
27333 
27334         /* ICRS astrometric RA,Dec. */
27335         SphericalCoordinate co = jauC2s(pco);
27336         co.alpha = jauAnp(co.alpha);
27337 
27338         return co;
27339         /* Finished. */
27340 
27341 
27342     }
27343     
27344     /**
27345      * Observed Position.
27346      *  "Observed" Az,ZD means the position that would be seen by a
27347      *      perfect geodetically aligned theodolite.  (Zenith distance is
27348      *      used rather than altitude in order to reflect the fact that no
27349      *      allowance is made for depression of the horizon.)  This is
27350      *      related to the observed HA,Dec via the standard rotation, using
27351      *      the geodetic latitude (corrected for polar motion), while the
27352      *      observed HA and RA are related simply through the Earth rotation
27353      *      angle and the site longitude.  "Observed" RA,Dec or HA,Dec thus
27354      *      means the position that would be seen by a perfect equatorial
27355      *      with its polar axis aligned to the Earth's axis of rotation..
27356      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 28 Mar 2014
27357      * @version $Revision$ $date$
27358      */
27359     public static class ObservedPosition{
27360         /**    observed azimuth (radians: N=0,E=90) */
27361         public double   aob;
27362 
27363         /**    observed zenith distance (radians)   */
27364         public double   zob;
27365 
27366         /**    observed Hour Angle (radians)        */
27367         public double   hob;
27368 
27369         /**    observed Declination (radians)       */
27370         public double   dob;
27371 
27372         /**    observed Right Ascension (radians)   */
27373         public double   rob;
27374         public ObservedPosition(double   aob,
27375                 double   zob,
27376                 double   hob,
27377                 double   dob,
27378                 double   rob
27379         ) {
27380             this.aob =  aob;
27381             this.zob =  zob;
27382             this.hob =  hob;
27383             this.dob =  dob;
27384             this.rob =  rob;  
27385         }
27386     }
27387     
27388     /**
27389      * Observed position with the equation of the origins.
27390      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 29 Mar 2014
27391      * @version $Revision$ $date$
27392      */
27393     public static class ObservedPositionEO {
27394        /**
27395         * observed position.
27396         */
27397         public ObservedPosition op;
27398         /**
27399          * The equation of the origins.    The equation of the origins is the distance between the true
27400          *  equinox and the celestial intermediate origin and, equivalently,
27401          *  the difference between Earth rotation angle and Greenwich
27402          *  apparent sidereal time (ERA-GST).  It comprises the precession
27403          *  (since J2000.0) in right ascension plus the equation of the
27404          *  equinoxes (including the small correction terms).   
27405          */
27406         public double eo;
27407         /**
27408          * @param op
27409          * @param eo
27410          */
27411         public ObservedPositionEO(ObservedPosition op, double eo) {
27412             this.op = op;
27413             this.eo = eo;
27414         }
27415         
27416     }
27417 
27418     
27419     
27420     
27421     /**
27422      *  CIRS RA,Dec to observed place.  The caller supplies UTC, site
27423      *  coordinates, ambient air conditions and observing wavelength.
27424      *
27425      *<p>This function is derived from the International Astronomical Union's
27426      *  SOFA (Standards of Fundamental Astronomy) software collection.
27427      *
27428      *<p>Status:  support function.
27429      *
27430      *<!-- Given: -->
27431      *     @param ri      double    CIRS right ascension (CIO-based, radians)
27432      *     @param di      double    CIRS declination (radians)
27433      *     @param utc1    double    UTC as a 2-part...
27434      *     @param utc2    double    ...quasi Julian Date (Notes 1,2)
27435      *     @param dut1    double    UT1-UTC (seconds, Note 3)
27436      *     @param elong   double    longitude (radians, east +ve, Note 4)
27437      *     @param phi     double    geodetic latitude (radians, Note 4)
27438      *     @param hm      double    height above ellipsoid (m, geodetic Notes 4,6)
27439      *     @param xp double    polar motion coordinates (radians, Note 5)
27440      *     @param yp double    polar motion coordinates (radians, Note 5) 
27441      *     @param phpa    double    pressure at the observer (hPa = mB, Note 6)
27442      *     @param tc      double    ambient temperature at the observer (deg C)
27443      *     @param rh      double    relative humidity at the observer (range 0-1)
27444      *     @param wl      double    wavelength (micrometers, Note 7)
27445      *
27446      *<!-- Returned:-->
27447      *     @return aob     double*    <b>Returned</b> observed azimuth (radians: N=0,E=90)
27448      *             zob     double*    <b>Returned</b> observed zenith distance (radians)
27449      *             hob     double*    <b>Returned</b> observed hour angle (radians)
27450      *             dob     double*    <b>Returned</b> observed declination (radians)
27451      *             rob     double*    <b>Returned</b> observed right ascension (CIO-based, radians)
27452      *
27453      *  @throws JSOFAInternalError
27454      *  @throws JSOFAIllegalParameter
27455      *             int       status:   <b>Returned</b> +1 = dubious year (Note 2)
27456      *                              0  =   <b>Returned</b> OK
27457      *                              -1  =   <b>Returned</b> unacceptable date
27458      *
27459      *<p>Notes:
27460      * <ol>
27461      *
27462      *  <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
27463      *      convenient way between the two arguments, for example where utc1
27464      *      is the Julian Day Number and utc2 is the fraction of a day.
27465      *
27466      *      <p>However, JD cannot unambiguously represent UTC during a leap
27467      *      second unless special measures are taken.  The convention in the
27468      *      present function is that the JD day represents UTC days whether
27469      *      the length is 86399, 86400 or 86401 SI seconds.
27470      *
27471      *      <p>Applications should use the function iauDtf2d to convert from
27472      *      calendar date and time of day into 2-part quasi Julian Date, as
27473      *      it implements the leap-second-ambiguity convention just
27474      *      described.
27475      *
27476      *  <li> The warning status "dubious year" flags UTCs that predate the
27477      *      introduction of the time scale or that are too far in the
27478      *      future to be trusted.  See iauDat for further details.
27479      *
27480      *  <li> UT1-UTC is tabulated in IERS bulletins.  It increases by exactly
27481      *      one second at the end of each positive UTC leap second,
27482      *      introduced in order to keep UT1-UTC within +/- 0.9s.  n.b. This
27483      *      practice is under review, and in the future UT1-UTC may grow
27484      *      essentially without limit.
27485      *
27486      *  <li> The geographical coordinates are with respect to the WGS84
27487      *      reference ellipsoid.  TAKE CARE WITH THE LONGITUDE SIGN:  the
27488      *      longitude required by the present function is east-positive
27489      *      (i.e. right-handed), in accordance with geographical convention.
27490      *
27491      *  <li> The polar motion xp,yp can be obtained from IERS bulletins.  The
27492      *      values are the coordinates (in radians) of the Celestial
27493      *      Intermediate Pole with respect to the International Terrestrial
27494      *      Reference System (see IERS Conventions 2003), measured along the
27495      *      meridians 0 and 90 deg west respectively.  For many
27496      *      applications, xp and yp can be set to zero.
27497      *
27498      *  <li> If hm, the height above the ellipsoid of the observing station
27499      *      in meters, is not known but phpa, the pressure in hPa (=mB), is
27500      *      available, an adequate estimate of hm can be obtained from the
27501      *      expression
27502      *
27503      *            <p>hm = -29.3 * tsl * log ( phpa / 1013.25 );
27504      *
27505      *      <p>where tsl is the approximate sea-level air temperature in K
27506      *      (See Astrophysical Quantities, C.W.Allen, 3rd edition, section
27507      *      52).  Similarly, if the pressure phpa is not known, it can be
27508      *      estimated from the height of the observing station, hm, as
27509      *      follows:
27510      *
27511      *            <p>phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) );
27512      *
27513      *      <p>Note, however, that the refraction is nearly proportional to
27514      *      the pressure and that an accurate phpa value is important for
27515      *      precise work.
27516      *
27517      *  <li> The argument wl specifies the observing wavelength in
27518      *      micrometers.  The transition from optical to radio is assumed to
27519      *      occur at 100 micrometers (about 3000 GHz).
27520      *
27521      *  <li> "Observed" Az,ZD means the position that would be seen by a
27522      *      perfect geodetically aligned theodolite.  (Zenith distance is
27523      *      used rather than altitude in order to reflect the fact that no
27524      *      allowance is made for depression of the horizon.)  This is
27525      *      related to the observed HA,Dec via the standard rotation, using
27526      *      the geodetic latitude (corrected for polar motion), while the
27527      *      observed HA and RA are related simply through the Earth rotation
27528      *      angle and the site longitude.  "Observed" RA,Dec or HA,Dec thus
27529      *      means the position that would be seen by a perfect equatorial
27530      *      with its polar axis aligned to the Earth's axis of rotation.
27531      *
27532      *  <li> The accuracy of the result is limited by the corrections for
27533      *      refraction, which use a simple A*tan(z) + B*tan^3(z) model.
27534      *      Providing the meteorological parameters are known accurately and
27535      *      there are no gross local effects, the predicted astrometric
27536      *      coordinates should be within 0.05 arcsec (optical) or 1 arcsec
27537      *      (radio) for a zenith distance of less than 70 degrees, better
27538      *      than 30 arcsec (optical or radio) at 85 degrees and better
27539      *      than 20 arcmin (optical) or 30 arcmin (radio) at the horizon.
27540      *
27541      *  <li> The complementary functions iauAtio13 and iauAtoi13 are self-
27542      *      consistent to better than 1 microarcsecond all over the
27543      *      celestial sphere.
27544      *
27545      *  <li> It is advisable to take great care with units, as even unlikely
27546      *      values of the input parameters are accepted and processed in
27547      *      accordance with the models used.
27548      *
27549      * </ol>
27550      *  Called:
27551      * <ul>
27552      *     <li>{@link #jauApio13} astrometry parameters, CIRS-observed, 2013
27553      *     <li>{@link #jauAtioq} quick CIRS to observed
27554      *
27555      * </ul>
27556      *@version  2013 October 9
27557      *
27558      *@since JSOFA release 20131202
27559      *
27560      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
27561      * @throws JSOFAInternalError 
27562      * @throws JSOFAIllegalParameter 
27563      */
27564     public static ObservedPosition jauAtio13(double ri, double di,
27565             double utc1, double utc2, double dut1,
27566             double elong, double phi, double hm, double xp, double yp,
27567             double phpa, double tc, double rh, double wl) throws JSOFAIllegalParameter, JSOFAInternalError
27568     {
27569         Astrom astrom = new Astrom();
27570 
27571 
27572         /* Star-independent astrometry parameters for CIRS->observed. */
27573         jauApio13(utc1, utc2, dut1, elong, phi, hm, xp, yp,
27574                 phpa, tc, rh, wl, astrom);
27575 
27576         /* Transform CIRS to observed. */
27577         return jauAtioq(ri, di, astrom);
27578 
27579         /* Finished. */
27580 
27581 
27582     }
27583 
27584     /**
27585      *  Quick CIRS to observed place transformation.
27586      *
27587      *  Use of this function is appropriate when efficiency is important and
27588      *  where many star positions are all to be transformed for one date.
27589      *  The star-independent astrometry parameters can be obtained by
27590      *  calling iauApio[13] or iauApco[13].
27591      *
27592      *<p>This function is derived from the International Astronomical Union's
27593      *  SOFA (Standards of Fundamental Astronomy) software collection.
27594      *
27595      *<p>Status:  support function.
27596      *
27597      *<!-- Given: -->
27598      *     @param ri      double      CIRS right ascension
27599      *     @param di      double      CIRS declination
27600      *     @param astrom    star-independent astrometry parameters:
27601      *
27602      *<!-- Returned:-->
27603      *     @return aob     double*      <b>Returned</b> observed azimuth (radians: N=0,E=90)
27604      *             zob     double*      <b>Returned</b> observed zenith distance (radians)
27605      *             hob     double*      <b>Returned</b> observed hour angle (radians)
27606      *             dob     double*      <b>Returned</b> observed declination (radians)
27607      *             rob     double*      <b>Returned</b> observed right ascension (CIO-based, radians)
27608      *
27609      *<p>Notes:
27610      * <ol>
27611      *
27612      *  <li> This function returns zenith distance rather than altitude in
27613      *     order to reflect the fact that no allowance is made for
27614      *     depression of the horizon.
27615      *
27616      *  <li> The accuracy of the result is limited by the corrections for
27617      *     refraction, which use a simple A*tan(z) + B*tan^3(z) model.
27618      *     Providing the meteorological parameters are known accurately and
27619      *     there are no gross local effects, the predicted observed
27620      *     coordinates should be within 0.05 arcsec (optical) or 1 arcsec
27621      *     (radio) for a zenith distance of less than 70 degrees, better
27622      *     than 30 arcsec (optical or radio) at 85 degrees and better
27623      *     than 20 arcmin (optical) or 30 arcmin (radio) at the horizon.
27624      *
27625      *     <p>Without refraction, the complementary functions iauAtioq and
27626      *     iauAtoiq are self-consistent to better than 1 microarcsecond all
27627      *     over the celestial sphere.  With refraction included, consistency
27628      *     falls off at high zenith distances, but is still better than
27629      *     0.05 arcsec at 85 degrees.
27630      *
27631      *  <li> It is advisable to take great care with units, as even unlikely
27632      *     values of the input parameters are accepted and processed in
27633      *     accordance with the models used.
27634      *
27635      *  <li> The CIRS RA,Dec is obtained from a star catalog mean place by
27636      *     allowing for space motion, parallax, the Sun's gravitational lens
27637      *     effect, annual aberration and precession-nutation.  For star
27638      *     positions in the ICRS, these effects can be applied by means of
27639      *     the iauAtci13 (etc.) functions.  Starting from classical "mean
27640      *     place" systems, additional transformations will be needed first.
27641      *
27642      *  <li> "Observed" Az,El means the position that would be seen by a
27643      *     perfect geodetically aligned theodolite.  This is obtained from
27644      *     the CIRS RA,Dec by allowing for Earth orientation and diurnal
27645      *     aberration, rotating from equator to horizon coordinates, and
27646      *     then adjusting for refraction.  The HA,Dec is obtained by
27647      *     rotating back into equatorial coordinates, and is the position
27648      *     that would be seen by a perfect equatorial with its polar axis
27649      *     aligned to the Earth's axis of rotation.  Finally, the RA is
27650      *     obtained by subtracting the HA from the local ERA.
27651      *
27652      *  <li> The star-independent CIRS-to-observed-place parameters in ASTROM
27653      *     may be computed with iauApio[13] or iauApco[13].  If nothing has
27654      *     changed significantly except the time, iauAper[13] may be used to
27655      *     perform the requisite adjustment to the astrom structure.
27656      *
27657      * </ol>
27658      *  Called:
27659      * <ul>
27660      *     <li>{@link #jauS2c} spherical coordinates to unit vector
27661      *     <li>{@link #jauC2s} p-vector to spherical
27662      *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
27663      *
27664      * </ul>
27665      *@version  2013 December 5
27666      *
27667      *@since JSOFA release 20131202
27668      *
27669      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
27670      */
27671     public static ObservedPosition jauAtioq(double ri, double di, Astrom astrom)
27672     {
27673         /* Minimum cos(alt) and sin(alt) for refraction purposes */
27674         final double CELMIN = 1e-6;
27675         final double SELMIN = 0.05;
27676 
27677         double v[] = new double[3], x, y, z, xhd, yhd, zhd, f, xhdt, yhdt, zhdt,
27678                 xaet, yaet, zaet, azobs, r, tz, w, del, cosdel,
27679                 xaeo, yaeo, zaeo, zdobs, hmobs, dcobs, raobs;
27680 
27681         /*--------------------------------------------------------------------*/
27682 
27683         /* CIRS RA,Dec to Cartesian -HA,Dec. */
27684         v = jauS2c(ri-astrom.eral, di);
27685         x = v[0];
27686         y = v[1];
27687         z = v[2];
27688 
27689         /* Polar motion. */
27690         xhd = x + astrom.xpl*z;
27691         yhd = y - astrom.ypl*z;
27692         zhd = z - astrom.xpl*x + astrom.ypl*y;
27693 
27694         /* Diurnal aberration. */
27695         f = ( 1.0 - astrom.diurab*yhd );
27696         xhdt = f * xhd;
27697         yhdt = f * ( yhd + astrom.diurab );
27698         zhdt = f * zhd;
27699 
27700         /* Cartesian -HA,Dec to Cartesian Az,El (S=0,E=90). */
27701         xaet = astrom.sphi*xhdt - astrom.cphi*zhdt;
27702         yaet = yhdt;
27703         zaet = astrom.cphi*xhdt + astrom.sphi*zhdt;
27704 
27705         /* Azimuth (N=0,E=90). */
27706         azobs = ( xaet != 0.0 || yaet != 0.0 ) ? atan2(yaet,-xaet) : 0.0;
27707 
27708         /* ---------- */
27709         /* Refraction */
27710         /* ---------- */
27711 
27712         /* Cosine and sine of altitude, with precautions. */
27713         r = sqrt(xaet*xaet + yaet*yaet);
27714         r = r > CELMIN ? r : CELMIN;
27715         z = zaet > SELMIN ? zaet : SELMIN;
27716 
27717         /* A*tan(z)+B*tan^3(z) model, with Newton-Raphson correction. */
27718         tz = r/z;
27719         w = astrom.refb*tz*tz;
27720         del = ( astrom.refa + w ) * tz /
27721                 ( 1.0 + ( astrom.refa + 3.0*w ) / ( z*z ) );
27722 
27723         /* Apply the change, giving observed vector. */
27724         cosdel = 1.0 - del*del/2.0;
27725         f = cosdel - del*z/r;
27726         xaeo = xaet*f;
27727         yaeo = yaet*f;
27728         zaeo = cosdel*zaet + del*r;
27729 
27730         /* Observed ZD. */
27731         zdobs = atan2(sqrt(xaeo*xaeo+yaeo*yaeo), zaeo);
27732 
27733         /* Az/El vector to HA,Dec vector (both right-handed). */
27734         v[0] = astrom.sphi*xaeo + astrom.cphi*zaeo;
27735         v[1] = yaeo;
27736         v[2] = - astrom.cphi*xaeo + astrom.sphi*zaeo;
27737 
27738         /* To spherical -HA,Dec. */
27739         SphericalCoordinate co = jauC2s ( v);
27740         hmobs = co.alpha;
27741         dcobs = co.delta;
27742         /* Right ascension (with respect to CIO). */
27743         raobs = astrom.eral + hmobs;
27744 
27745         /* Return the results. */
27746         return new ObservedPosition(
27747         jauAnp(azobs),
27748         zdobs,
27749         -hmobs,
27750         dcobs,
27751         jauAnp(raobs));
27752 
27753         /* Finished. */
27754 
27755 
27756     }
27757 
27758     /**
27759      *  Observed place at a groundbased site to to ICRS astrometric RA,Dec.
27760      *  The caller supplies UTC, site coordinates, ambient air conditions
27761      *  and observing wavelength.
27762      *
27763      *<p>This function is derived from the International Astronomical Union's
27764      *  SOFA (Standards of Fundamental Astronomy) software collection.
27765      *
27766      *<p>Status:  support function.
27767      *
27768      *<!-- Given: -->
27769      *     @param type    char[]    type of coordinates - "R", "H" or "A" (Notes 1,2)
27770      *     @param ob1     double    observed Az, HA or RA (radians; Az is N=0,E=90)
27771      *     @param ob2     double    observed ZD or Dec (radians)
27772      *     @param utc1    double    UTC as a 2-part...
27773      *     @param utc2    double    ...quasi Julian Date (Notes 3,4)
27774      *     @param dut1    double    UT1-UTC (seconds, Note 5)
27775      *     @param elong   double    longitude (radians, east +ve, Note 6)
27776      *     @param phi     double    geodetic latitude (radians, Note 6)
27777      *     @param hm      double    height above ellipsoid (m, geodetic Notes 6,8)
27778      *     @param xp double    polar motion coordinates (radians, Note 7)
27779      *     @param yp double    polar motion coordinates (radians, Note 7) 
27780      *     @param phpa    double    pressure at the observer (hPa = mB, Note 8)
27781      *     @param tc      double    ambient temperature at the observer (deg C)
27782      *     @param rh      double    relative humidity at the observer (range 0-1)
27783      *     @param wl      double    wavelength (micrometers, Note 9)
27784      *
27785      *<!-- Returned:-->
27786      *     @return rc,dc   double     <b>Returned</b> ICRS astrometric RA,Dec (radians)
27787      *
27788      *  @throws JSOFAInternalError
27789      *  @throws JSOFAIllegalParameter
27790      *                   int       status:   <b>Returned</b> +1 = dubious year (Note 4)
27791      *                               0  =   <b>Returned</b> OK
27792      *                              -1  =   <b>Returned</b> unacceptable date
27793      *
27794      *<p>Notes:
27795      * <ol>
27796      *
27797      *  <li> "Observed" Az,ZD means the position that would be seen by a
27798      *      perfect geodetically aligned theodolite.  (Zenith distance is
27799      *      used rather than altitude in order to reflect the fact that no
27800      *      allowance is made for depression of the horizon.)  This is
27801      *      related to the observed HA,Dec via the standard rotation, using
27802      *      the geodetic latitude (corrected for polar motion), while the
27803      *      observed HA and RA are related simply through the Earth rotation
27804      *      angle and the site longitude.  "Observed" RA,Dec or HA,Dec thus
27805      *      means the position that would be seen by a perfect equatorial
27806      *      with its polar axis aligned to the Earth's axis of rotation.
27807      *
27808      *  <li> Only the first character of the type argument is significant.
27809      *      "R" or "r" indicates that ob1 and ob2 are the observed right
27810      *      ascension and declination;  "H" or "h" indicates that they are
27811      *      hour angle (west +ve) and declination;  anything else ("A" or
27812      *      "a" is recommended) indicates that ob1 and ob2 are azimuth
27813      *      (north zero, east 90 deg) and zenith distance.
27814      *
27815      *  <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
27816      *      convenient way between the two arguments, for example where utc1
27817      *      is the Julian Day Number and utc2 is the fraction of a day.
27818      *
27819      *      <p>However, JD cannot unambiguously represent UTC during a leap
27820      *      second unless special measures are taken.  The convention in the
27821      *      present function is that the JD day represents UTC days whether
27822      *      the length is 86399, 86400 or 86401 SI seconds.
27823      *
27824      *      <p>Applications should use the function iauDtf2d to convert from
27825      *      calendar date and time of day into 2-part quasi Julian Date, as
27826      *      it implements the leap-second-ambiguity convention just
27827      *      described.
27828      *
27829      *  <li> The warning status "dubious year" flags UTCs that predate the
27830      *      introduction of the time scale or that are too far in the
27831      *      future to be trusted.  See iauDat for further details.
27832      *
27833      *  <li> UT1-UTC is tabulated in IERS bulletins.  It increases by exactly
27834      *      one second at the end of each positive UTC leap second,
27835      *      introduced in order to keep UT1-UTC within +/- 0.9s.  n.b. This
27836      *      practice is under review, and in the future UT1-UTC may grow
27837      *      essentially without limit.
27838      *
27839      *  <li> The geographical coordinates are with respect to the WGS84
27840      *      reference ellipsoid.  TAKE CARE WITH THE LONGITUDE SIGN:  the
27841      *      longitude required by the present function is east-positive
27842      *      (i.e. right-handed), in accordance with geographical convention.
27843      *
27844      *  <li> The polar motion xp,yp can be obtained from IERS bulletins.  The
27845      *      values are the coordinates (in radians) of the Celestial
27846      *      Intermediate Pole with respect to the International Terrestrial
27847      *      Reference System (see IERS Conventions 2003), measured along the
27848      *      meridians 0 and 90 deg west respectively.  For many
27849      *      applications, xp and yp can be set to zero.
27850      *
27851      *  <li> If hm, the height above the ellipsoid of the observing station
27852      *      in meters, is not known but phpa, the pressure in hPa (=mB), is
27853      *      available, an adequate estimate of hm can be obtained from the
27854      *      expression
27855      *
27856      *            <p>hm = -29.3 * tsl * log ( phpa / 1013.25 );
27857      *
27858      *      <p>where tsl is the approximate sea-level air temperature in K
27859      *      (See Astrophysical Quantities, C.W.Allen, 3rd edition, section
27860      *      52).  Similarly, if the pressure phpa is not known, it can be
27861      *      estimated from the height of the observing station, hm, as
27862      *      follows:
27863      *
27864      *            <p>phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) );
27865      *
27866      *      <p>Note, however, that the refraction is nearly proportional to
27867      *      the pressure and that an accurate phpa value is important for
27868      *      precise work.
27869      *
27870      *  <li> The argument wl specifies the observing wavelength in
27871      *      micrometers.  The transition from optical to radio is assumed to
27872      *      occur at 100 micrometers (about 3000 GHz).
27873      *
27874      *  <li> The accuracy of the result is limited by the corrections for
27875      *      refraction, which use a simple A*tan(z) + B*tan^3(z) model.
27876      *      Providing the meteorological parameters are known accurately and
27877      *      there are no gross local effects, the predicted astrometric
27878      *      coordinates should be within 0.05 arcsec (optical) or 1 arcsec
27879      *      (radio) for a zenith distance of less than 70 degrees, better
27880      *      than 30 arcsec (optical or radio) at 85 degrees and better
27881      *      than 20 arcmin (optical) or 30 arcmin (radio) at the horizon.
27882      *
27883      *      <p>Without refraction, the complementary functions iauAtco13 and
27884      *      iauAtoc13 are self-consistent to better than 1 microarcsecond
27885      *      all over the celestial sphere.  With refraction included,
27886      *      consistency falls off at high zenith distances, but is still
27887      *      better than 0.05 arcsec at 85 degrees.
27888      *
27889      *  <li> It is advisable to take great care with units, as even unlikely
27890      *      values of the input parameters are accepted and processed in
27891      *      accordance with the models used.
27892      *
27893      * </ol>
27894      *  Called:
27895      * <ul>
27896      *     <li>{@link #jauApco13} astrometry parameters, ICRS-observed
27897      *     <li>{@link #jauAtoiq} quick observed to CIRS
27898      *     <li>{@link #jauAticq} quick CIRS to ICRS
27899      *
27900      * </ul>
27901      *@version  2013 October 9
27902      *
27903      *@since JSOFA release 20131202
27904      *
27905      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
27906      * @throws JSOFAInternalError 
27907      * @throws JSOFAIllegalParameter 
27908      */
27909     public static SphericalCoordinate jauAtoc13(String type, double ob1, double ob2,
27910             double utc1, double utc2, double dut1,
27911             double elong, double phi, double hm, double xp, double yp,
27912             double phpa, double tc, double rh, double wl
27913             ) throws JSOFAIllegalParameter, JSOFAInternalError
27914     {
27915         Astrom astrom = new Astrom();
27916         jauApco13(utc1, utc2, dut1, elong, phi, hm, xp, yp,
27917                 phpa, tc, rh, wl, astrom);
27918 
27919         /* Transform observed to CIRS. */
27920         SphericalCoordinate co = jauAtoiq(type, ob1, ob2, astrom);
27921 
27922         /* Transform CIRS to ICRS. */
27923         SphericalCoordinate icrs = jauAticq(co.alpha, co.delta, astrom);
27924         return icrs;
27925        
27926 
27927         /* Finished. */
27928 
27929 
27930     }
27931 
27932     /**
27933      *  Observed place to CIRS.  The caller supplies UTC, site coordinates,
27934      *  ambient air conditions and observing wavelength.
27935      *
27936      *<p>This function is derived from the International Astronomical Union's
27937      *  SOFA (Standards of Fundamental Astronomy) software collection.
27938      *
27939      *<p>Status:  support function.
27940      *
27941      *<!-- Given: -->
27942      *     @param type    char[]    type of coordinates - "R", "H" or "A" (Notes 1,2)
27943      *     @param ob1     double    observed Az, HA or RA (radians; Az is N=0,E=90)
27944      *     @param ob2     double    observed ZD or Dec (radians)
27945      *     @param utc1    double    UTC as a 2-part...
27946      *     @param utc2    double    ...quasi Julian Date (Notes 3,4)
27947      *     @param dut1    double    UT1-UTC (seconds, Note 5)
27948      *     @param elong   double    longitude (radians, east +ve, Note 6)
27949      *     @param phi     double    geodetic latitude (radians, Note 6)
27950      *     @param hm      double    height above the ellipsoid (meters, Notes 6,8)
27951      *     @param xp double    polar motion coordinates (radians, Note 7)
27952      *     @param yp double    polar motion coordinates (radians, Note 7) 
27953      *     @param phpa    double    pressure at the observer (hPa = mB, Note 8)
27954      *     @param tc      double    ambient temperature at the observer (deg C)
27955      *     @param rh      double    relative humidity at the observer (range 0-1)
27956      *     @param wl      double    wavelength (micrometers, Note 9)
27957      *
27958      *<!-- Returned:-->
27959      *     @return ri      double*    <b>Returned</b> CIRS right ascension (CIO-based, radians)
27960      *             di      double*    <b>Returned</b> CIRS declination (radians)
27961      *
27962      *  @throws JSOFAInternalError
27963      *  @throws JSOFAIllegalParameter
27964      *             int       status:   <b>Returned</b> +1 = dubious year (Note 2)
27965      *                               0  =   <b>Returned</b> OK
27966      *                              -1  =   <b>Returned</b> unacceptable date
27967      *
27968      *<p>Notes:
27969      * <ol>
27970      *
27971      *  <li> "Observed" Az,ZD means the position that would be seen by a
27972      *      perfect geodetically aligned theodolite.  (Zenith distance is
27973      *      used rather than altitude in order to reflect the fact that no
27974      *      allowance is made for depression of the horizon.)  This is
27975      *      related to the observed HA,Dec via the standard rotation, using
27976      *      the geodetic latitude (corrected for polar motion), while the
27977      *      observed HA and RA are related simply through the Earth rotation
27978      *      angle and the site longitude.  "Observed" RA,Dec or HA,Dec thus
27979      *      means the position that would be seen by a perfect equatorial
27980      *      with its polar axis aligned to the Earth's axis of rotation.
27981      *
27982      *  <li> Only the first character of the type argument is significant.
27983      *      "R" or "r" indicates that ob1 and ob2 are the observed right
27984      *      ascension and declination;  "H" or "h" indicates that they are
27985      *      hour angle (west +ve) and declination;  anything else ("A" or
27986      *      "a" is recommended) indicates that ob1 and ob2 are azimuth
27987      *      (north zero, east 90 deg) and zenith distance.
27988      *
27989      *  <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
27990      *      convenient way between the two arguments, for example where utc1
27991      *      is the Julian Day Number and utc2 is the fraction of a day.
27992      *
27993      *      <p>However, JD cannot unambiguously represent UTC during a leap
27994      *      second unless special measures are taken.  The convention in the
27995      *      present function is that the JD day represents UTC days whether
27996      *      the length is 86399, 86400 or 86401 SI seconds.
27997      *
27998      *      <p>Applications should use the function iauDtf2d to convert from
27999      *      calendar date and time of day into 2-part quasi Julian Date, as
28000      *      it implements the leap-second-ambiguity convention just
28001      *      described.
28002      *
28003      *  <li> The warning status "dubious year" flags UTCs that predate the
28004      *      introduction of the time scale or that are too far in the
28005      *      future to be trusted.  See iauDat for further details.
28006      *
28007      *  <li> UT1-UTC is tabulated in IERS bulletins.  It increases by exactly
28008      *      one second at the end of each positive UTC leap second,
28009      *      introduced in order to keep UT1-UTC within +/- 0.9s.  n.b. This
28010      *      practice is under review, and in the future UT1-UTC may grow
28011      *      essentially without limit.
28012      *
28013      *  <li> The geographical coordinates are with respect to the WGS84
28014      *      reference ellipsoid.  TAKE CARE WITH THE LONGITUDE SIGN:  the
28015      *      longitude required by the present function is east-positive
28016      *      (i.e. right-handed), in accordance with geographical convention.
28017      *
28018      *  <li> The polar motion xp,yp can be obtained from IERS bulletins.  The
28019      *      values are the coordinates (in radians) of the Celestial
28020      *      Intermediate Pole with respect to the International Terrestrial
28021      *      Reference System (see IERS Conventions 2003), measured along the
28022      *      meridians 0 and 90 deg west respectively.  For many
28023      *      applications, xp and yp can be set to zero.
28024      *
28025      *  <li> If hm, the height above the ellipsoid of the observing station
28026      *      in meters, is not known but phpa, the pressure in hPa (=mB), is
28027      *      available, an adequate estimate of hm can be obtained from the
28028      *      expression
28029      *
28030      *            <p>hm = -29.3 * tsl * log ( phpa / 1013.25 );
28031      *
28032      *      <p>where tsl is the approximate sea-level air temperature in K
28033      *      (See Astrophysical Quantities, C.W.Allen, 3rd edition, section
28034      *      52).  Similarly, if the pressure phpa is not known, it can be
28035      *      estimated from the height of the observing station, hm, as
28036      *      follows:
28037      *
28038      *            <p>phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) );
28039      *
28040      *      <p>Note, however, that the refraction is nearly proportional to
28041      *      the pressure and that an accurate phpa value is important for
28042      *      precise work.
28043      *
28044      *  <li> The argument wl specifies the observing wavelength in
28045      *      micrometers.  The transition from optical to radio is assumed to
28046      *      occur at 100 micrometers (about 3000 GHz).
28047      *
28048      *  <li> The accuracy of the result is limited by the corrections for
28049      *      refraction, which use a simple A*tan(z) + B*tan^3(z) model.
28050      *      Providing the meteorological parameters are known accurately and
28051      *      there are no gross local effects, the predicted astrometric
28052      *      coordinates should be within 0.05 arcsec (optical) or 1 arcsec
28053      *      (radio) for a zenith distance of less than 70 degrees, better
28054      *      than 30 arcsec (optical or radio) at 85 degrees and better
28055      *      than 20 arcmin (optical) or 30 arcmin (radio) at the horizon.
28056      *
28057      *      <p>Without refraction, the complementary functions iauAtio13 and
28058      *      iauAtoi13 are self-consistent to better than 1 microarcsecond
28059      *      all over the celestial sphere.  With refraction included,
28060      *      consistency falls off at high zenith distances, but is still
28061      *      better than 0.05 arcsec at 85 degrees.
28062      *
28063      *  <li> It is advisable to take great care with units, as even unlikely
28064      *      values of the input parameters are accepted and processed in
28065      *      accordance with the models used.
28066      *
28067      * </ol>
28068      *  Called:
28069      * <ul>
28070      *     <li>{@link #jauApio13} astrometry parameters, CIRS-observed, 2013
28071      *     <li>{@link #jauAtoiq} quick observed to CIRS
28072      *
28073      * </ul>
28074      *@version  2013 October 9
28075      *
28076      *@since JSOFA release 20131202
28077      *
28078      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
28079      * @throws JSOFAInternalError 
28080      * @throws JSOFAIllegalParameter 
28081      */
28082     public static SphericalCoordinate jauAtoi13(String type, double ob1, double ob2,
28083             double utc1, double utc2, double dut1,
28084             double elong, double phi, double hm, double xp, double yp,
28085             double phpa, double tc, double rh, double wl
28086             ) throws JSOFAIllegalParameter, JSOFAInternalError
28087     {
28088         Astrom astrom = new Astrom();
28089 
28090 
28091         /* Star-independent astrometry parameters for CIRS->observed. */
28092         jauApio13(utc1, utc2, dut1, elong, phi, hm, xp, yp,
28093                 phpa, tc, rh, wl, astrom);
28094 
28095         /* Transform observed to CIRS. */
28096         SphericalCoordinate co = jauAtoiq(type, ob1, ob2, astrom);
28097         return co;
28098         
28099         /* Finished. */
28100 
28101 
28102     }
28103 
28104     /**
28105      *  Quick observed place to CIRS, given the star-independent astrometry
28106      *  parameters.
28107      * 
28108      *  Use of this function is appropriate when efficiency is important and
28109      *  where many star positions are all to be transformed for one date.
28110      *  The star-independent astrometry parameters can be obtained by
28111      *  calling iauApio[13] or iauApco[13].
28112      *
28113      *<p>Status:  support function.
28114      *
28115      *<!-- Given: -->
28116      *     @param type    char[]      type of coordinates: "R", "H" or "A" (Note 1)
28117      *     @param ob1     double      observed Az, HA or RA (radians; Az is N=0,E=90)
28118      *     @param ob2     double      observed ZD or Dec (radians)
28119      *     @param astrom    star-independent astrometry parameters:
28120      *
28121      *<!-- Returned:-->
28122      *     @return ri      double*      <b>Returned</b> CIRS right ascension (CIO-based, radians)
28123      *             di      double*      <b>Returned</b> CIRS declination (radians)
28124      *
28125      *<p>Notes:
28126      * <ol>
28127      *
28128      *  <li> "Observed" Az,El means the position that would be seen by a
28129      *     perfect geodetically aligned theodolite.  This is related to
28130      *     the observed HA,Dec via the standard rotation, using the geodetic
28131      *     latitude (corrected for polar motion), while the observed HA and
28132      *     RA are related simply through the Earth rotation angle and the
28133      *     site longitude.  "Observed" RA,Dec or HA,Dec thus means the
28134      *     position that would be seen by a perfect equatorial with its
28135      *     polar axis aligned to the Earth's axis of rotation.  By removing
28136      *     from the observed place the effects of atmospheric refraction and
28137      *     diurnal aberration, the CIRS RA,Dec is obtained.
28138      *
28139      *  <li> Only the first character of the type argument is significant.
28140      *     "R" or "r" indicates that ob1 and ob2 are the observed right
28141      *     ascension and declination;  "H" or "h" indicates that they are
28142      *     hour angle (west +ve) and declination;  anything else ("A" or
28143      *     "a" is recommended) indicates that ob1 and ob2 are azimuth (north
28144      *     zero, east 90 deg) and zenith distance.  (Zenith distance is used
28145      *     rather than altitude in order to reflect the fact that no
28146      *     allowance is made for depression of the horizon.)
28147      *
28148      *  <li> The accuracy of the result is limited by the corrections for
28149      *     refraction, which use a simple A*tan(z) + B*tan^3(z) model.
28150      *     Providing the meteorological parameters are known accurately and
28151      *     there are no gross local effects, the predicted observed
28152      *     coordinates should be within 0.05 arcsec (optical) or 1 arcsec
28153      *     (radio) for a zenith distance of less than 70 degrees, better
28154      *     than 30 arcsec (optical or radio) at 85 degrees and better than
28155      *     20 arcmin (optical) or 30 arcmin (radio) at the horizon.
28156      *
28157      *     <p>Without refraction, the complementary functions iauAtioq and
28158      *     iauAtoiq are self-consistent to better than 1 microarcsecond all
28159      *     over the celestial sphere.  With refraction included, consistency
28160      *     falls off at high zenith distances, but is still better than
28161      *     0.05 arcsec at 85 degrees.
28162      *
28163      *  <li> It is advisable to take great care with units, as even unlikely
28164      *     values of the input parameters are accepted and processed in
28165      *     accordance with the models used.
28166      *
28167      * </ol>
28168      *  Called:
28169      * <ul>
28170      *     <li>{@link #jauS2c} spherical coordinates to unit vector
28171      *     <li>{@link #jauC2s} p-vector to spherical
28172      *     <li>{@link #jauAnp} normalize angle into range 0 to 2pi
28173      *
28174      * </ul>
28175      *@version  2013 October 9
28176      *
28177      *@since JSOFA release 20131202
28178      *
28179      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
28180      */
28181     public static SphericalCoordinate jauAtoiq(String type,
28182             double ob1, double ob2, Astrom astrom
28183             )
28184     {
28185         char c;
28186         double c1, c2, sphi, cphi, ce, xaeo, yaeo, zaeo, v[] = new double[3],
28187         xmhdo, ymhdo, zmhdo, az, sz, zdo, refa, refb, tz, dref,
28188         zdt, xaet, yaet, zaet, xmhda, ymhda, zmhda,
28189         f, xhd, yhd, zhd, xpl, ypl, w;
28190 
28191 
28192         /* Coordinate type. */
28193         c = type.charAt(0);
28194 
28195         /* Coordinates. */
28196         c1 = ob1;
28197         c2 = ob2;
28198 
28199         /* Sin, cos of latitude. */
28200         sphi = astrom.sphi;
28201         cphi = astrom.cphi;
28202 
28203         /* Standardize coordinate type. */
28204         if ( c == 'r' || c == 'R' ) {
28205             c = 'R';
28206         } else if ( c == 'h' || c == 'H' ) {
28207             c = 'H';
28208         } else {
28209             c = 'A';
28210         }
28211 
28212         /* If Az,ZD, convert to Cartesian (S=0,E=90). */
28213         if ( c == 'A' ) {
28214             ce = sin(c2);
28215             xaeo = - cos(c1) * ce;
28216             yaeo = sin(c1) * ce;
28217             zaeo = cos(c2);
28218 
28219         } else {
28220 
28221             /* If RA,Dec, convert to HA,Dec. */
28222             if ( c == 'R' ) c1 = astrom.eral - c1;
28223 
28224             /* To Cartesian -HA,Dec. */
28225             v = jauS2c ( -c1, c2 );
28226             xmhdo = v[0];
28227             ymhdo = v[1];
28228             zmhdo = v[2];
28229 
28230             /* To Cartesian Az,El (S=0,E=90). */
28231             xaeo = sphi*xmhdo - cphi*zmhdo;
28232             yaeo = ymhdo;
28233             zaeo = cphi*xmhdo + sphi*zmhdo;
28234         }
28235 
28236         /* Azimuth (S=0,E=90). */
28237         az = ( xaeo != 0.0 || yaeo != 0.0 ) ? atan2(yaeo,xaeo) : 0.0;
28238 
28239         /* Sine of observed ZD, and observed ZD. */
28240         sz = sqrt ( xaeo*xaeo + yaeo*yaeo );
28241         zdo = atan2 ( sz, zaeo );
28242 
28243         /*
28244          * Refraction
28245          * ----------
28246          */
28247 
28248         /* Fast algorithm using two constant model. */
28249         refa = astrom.refa;
28250         refb = astrom.refb;
28251         tz = sz / zaeo;
28252         dref = ( refa + refb*tz*tz ) * tz;
28253         zdt = zdo + dref;
28254 
28255         /* To Cartesian Az,ZD. */
28256         ce = sin(zdt);
28257         xaet = cos(az) * ce;
28258         yaet = sin(az) * ce;
28259         zaet = cos(zdt);
28260 
28261         /* Cartesian Az,ZD to Cartesian -HA,Dec. */
28262         xmhda = sphi*xaet + cphi*zaet;
28263         ymhda = yaet;
28264         zmhda = - cphi*xaet + sphi*zaet;
28265 
28266         /* Diurnal aberration. */
28267         f = ( 1.0 + astrom.diurab*ymhda );
28268         xhd = f * xmhda;
28269         yhd = f * ( ymhda - astrom.diurab );
28270         zhd = f * zmhda;
28271 
28272         /* Polar motion. */
28273         xpl = astrom.xpl;
28274         ypl = astrom.ypl;
28275         w = xpl*xhd - ypl*yhd + zhd;
28276         v[0] = xhd - xpl*w;
28277         v[1] = yhd + ypl*w;
28278         v[2] = w - ( xpl*xpl + ypl*ypl ) * zhd;
28279 
28280         /* To spherical -HA,Dec. */
28281         SphericalCoordinate co = jauC2s(v);
28282 
28283         /* Right ascension. */
28284         co.alpha = jauAnp(astrom.eral + co.alpha);
28285 
28286         return co;
28287         /* Finished. */
28288 
28289 
28290     }
28291 
28292     /**
28293      *  Apply light deflection by a solar-system body, as part of
28294      *  transforming coordinate direction into natural direction.
28295      *
28296      *<p>This function is derived from the International Astronomical Union's
28297      *  SOFA (Standards of Fundamental Astronomy) software collection.
28298      *
28299      *<p>Status:  support function.
28300      *
28301      *<!-- Given: -->
28302      *     @param bm      double      mass of the gravitating body (solar masses)
28303      *     @param p       double[3]   direction from observer to source (unit vector)
28304      *     @param q       double[3]   direction from body to source (unit vector)
28305      *     @param e       double[3]   direction from body to observer (unit vector)
28306      *     @param em      double      distance from body to observer (au)
28307      *     @param dlim    double      deflection limiter (Note 4)
28308      *
28309      *<!-- Returned:-->
28310      *     @return p1      double[3]    <b>Returned</b> observer to deflected source (unit vector)
28311      *
28312      *<p>Notes:
28313      * <ol>
28314      *
28315      *  <li> The algorithm is based on Expr. (70) in Klioner (2003) and
28316      *     Expr. (7.63) in the Explanatory Supplement (Urban &amp; Seidelmann
28317      *     2013), with some rearrangement to minimize the effects of machine
28318      *     precision.
28319      *
28320      *  <li> The mass parameter bm can, as required, be adjusted in order to
28321      *     allow for such effects as quadrupole field.
28322      *
28323      *  <li> The barycentric position of the deflecting body should ideally
28324      *     correspond to the time of closest approach of the light ray to
28325      *     the body.
28326      *
28327      *  <li> The deflection limiter parameter dlim is phi^2/2, where phi is
28328      *     the angular separation (in radians) between source and body at
28329      *     which limiting is applied.  As phi shrinks below the chosen
28330      *     threshold, the deflection is artificially reduced, reaching zero
28331      *     for phi = 0.
28332      *
28333      *  <li> The returned vector p1 is not normalized, but the consequential
28334      *     departure from unit magnitude is always negligible.
28335      *
28336      *  <li> The arguments p and p1 can be the same array.
28337      *
28338      *  <li> To accumulate total light deflection taking into account the
28339      *     contributions from several bodies, call the present function for
28340      *     each body in succession, in decreasing order of distance from the
28341      *     observer.
28342      *
28343      *  <li> For efficiency, validation is omitted.  The supplied vectors must
28344      *     be of unit magnitude, and the deflection limiter non-zero and
28345      *     positive.
28346      *
28347      * </ol>
28348      *<p>References:
28349      * <ul>
28350      *
28351      * <li> Urban, S. &amp; Seidelmann, P. K. (eds), Explanatory Supplement to
28352      *     the Astronomical Almanac, 3rd ed., University Science Books
28353      *     (2013).
28354      *
28355      * <li> Klioner, Sergei A., "A practical relativistic model for micro-
28356      *     arcsecond astrometry in space", Astr. J. 125, 1580-1597 (2003).
28357      *
28358      * </ul>
28359      *  Called:
28360      * <ul>
28361      *     <li>{@link #jauPdp} scalar product of two p-vectors
28362      *     <li>{@link #jauPxp} vector product of two p-vectors
28363      *
28364      * </ul>
28365      *@version  2013 October 9
28366      *
28367      *@since JSOFA release 20131202
28368      *
28369      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
28370      */
28371     public static double[] jauLd(double bm, double p[], double q[], double e[],
28372             double em, double dlim)
28373     {
28374         int i;
28375         double qpe[] = new double[3], qdqpe, w, eq[], peq[] ;
28376 
28377         double p1[] = new double[3];
28378 
28379         /* q . (q + e). */
28380         for (i = 0; i < 3; i++) {
28381             qpe[i] = q[i] + e[i];
28382         }
28383         qdqpe = jauPdp(q, qpe);
28384 
28385         /* 2 x G x bm / ( em x c^2 x ( q . (q + e) ) ). */
28386         w = bm * SRS / em / max(qdqpe,dlim);
28387 
28388         /* p x (e x q). */
28389         eq = jauPxp(e, q);
28390         peq = jauPxp(p, eq);
28391 
28392         /* Apply the deflection. */
28393         for (i = 0; i < 3; i++) {
28394             p1[i] = p[i] + w*peq[i];
28395         }
28396 
28397         return p1;
28398         /* Finished. */
28399 
28400 
28401     }
28402 
28403     /*+
28404      *  - - - - - - -
28405      *   i a u L d n
28406      *  - - - - - - -
28407      *
28408      *  For a star, apply light deflection by multiple solar-system bodies,
28409      *  as part of transforming coordinate direction into natural direction.
28410      *
28411      *<p>This function is derived from the International Astronomical Union's
28412      *  SOFA (Standards of Fundamental Astronomy) software collection.
28413      *
28414      *<p>Status:  support function.
28415      *
28416      *<!-- Given: -->
28417      *     n    int           number of bodies (note 1)
28418      *     b    jauLDBODY[n]  data for each of the n bodies (Notes 1,2):
28419      *      bm   double         mass of the body (solar masses, Note 3)
28420      *      dl   double         deflection limiter (Note 4)
28421      *      pv   [2][3]         barycentric PV of the body (au, au/day)
28422      *     ob   double[3]     barycentric position of the observer (au)
28423      *     sc   double[3]     observer to star coord direction (unit vector)
28424      *
28425      *<!-- Returned:-->
28426      *     sn    double[3]      observer to deflected star (unit vector)
28427      *
28428      *  <li> The array b contains n entries, one for each body to be
28429      *     considered.  If n = 0, no gravitational light deflection will be
28430      *     applied, not even for the Sun.
28431      *
28432      *  <li> The array b should include an entry for the Sun as well as for
28433      *     any planet or other body to be taken into account.  The entries
28434      *     should be in the order in which the light passes the body.
28435      *
28436      *  <li> In the entry in the b array for body i, the mass parameter
28437      *     b[i].bm can, as required, be adjusted in order to allow for such
28438      *     effects as quadrupole field.
28439      *
28440      *  <li> The deflection limiter parameter b[i].dl is phi^2/2, where phi is
28441      *     the angular separation (in radians) between star and body at
28442      *     which limiting is applied.  As phi shrinks below the chosen
28443      *     threshold, the deflection is artificially reduced, reaching zero
28444      *     for phi = 0.   Example values suitable for a terrestrial
28445      *     observer, together with masses, are as follows:
28446      *
28447      *        body i     b[i].bm        b[i].dl
28448      *
28449      *        Sun        1.0            6e-6
28450      *        Jupiter    0.00095435     3e-9
28451      *        Saturn     0.00028574     3e-10
28452      *
28453      *  <li> For cases where the starlight passes the body before reaching the
28454      *     observer, the body is placed back along its barycentric track by
28455      *     the light time from that point to the observer.  For cases where
28456      *     the body is "behind" the observer no such shift is applied.  If
28457      *     a different treatment is preferred, the user has the option of
28458      *     instead using the iauLd function.  Similarly, iauLd can be used
28459      *     for cases where the source is nearby, not a star.
28460      *
28461      *  <li> The returned vector sn is not normalized, but the consequential
28462      *     departure from unit magnitude is always negligible.
28463      *
28464      *  <li> The arguments sc and sn can be the same array.
28465      *
28466      *  <li> For efficiency, validation is omitted.  The supplied masses must
28467      *     be greater than zero, the position and velocity vectors must be
28468      *     right, and the deflection limiter greater than zero.
28469      *
28470      *  Reference:
28471      *
28472      *     Urban, S. &amp; Seidelmann, P. K. (eds), Explanatory Supplement to
28473      *     the Astronomical Almanac, 3rd ed., University Science Books
28474      *     (2013), Section 7.2.4.
28475      *
28476      *  Called:
28477      *     iauCp        copy p-vector
28478      *     iauPdp       scalar product of two p-vectors
28479      *     iauPmp       p-vector minus p-vector
28480      *     iauPpsp      p-vector plus scaled p-vector
28481      *     iauPn        decompose p-vector into modulus and direction
28482      *     iauLd        light deflection by a solar-system body
28483      *
28484      *@version  2013 October 9
28485      *
28486      *@since JSOFA release 20131202
28487      *
28488      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
28489      */
28490     public static double[] jauLdn(int n, Ldbody b[], double ob[], double sc[])
28491     {
28492         /* Light time for 1 AU (days) */
28493         final double CR = AULT/DAYSEC;
28494 
28495         int i;
28496         double v[] , dt, ev[], sn[] = new double[3];
28497 
28498 
28499         /* Star direction prior to deflection. */
28500         jauCp(sc, sn);
28501 
28502         /* Body by body. */
28503         for ( i = 0; i < n; i++ ) {
28504 
28505             /* Body to observer vector at epoch of observation (au). */
28506             v = jauPmp( ob, b[i].pv[0]);
28507 
28508             /* Minus the time since the light passed the body (days). */
28509             dt = jauPdp(sn,v) * CR;
28510 
28511             /* Neutralize if the star is "behind" the observer. */
28512             dt = min(dt, 0.0);
28513 
28514             /* Backtrack the body to the time the light was passing the body. */
28515             ev = jauPpsp(v, -dt, b[i].pv[1]);
28516 
28517             /* Body to observer vector as magnitude and direction. */
28518             NormalizedVector nv = jauPn(ev);
28519             
28520             /* Apply light deflection for this body. */
28521             sn = jauLd( b[i].bm, sn, sn, nv.u, nv.r, b[i].dl );
28522 
28523             /* Next body. */
28524         }
28525         return sn;
28526 
28527         /* Finished. */
28528 
28529 
28530     }
28531 
28532     /**
28533      *   Deflection of starlight by the Sun.
28534      *
28535      *<p>This function is derived from the International Astronomical Union's
28536      *  SOFA (Standards of Fundamental Astronomy) software collection.
28537      *
28538      *<p>Status:  support function.
28539      *
28540      *<!-- Given: -->
28541      *     @param p       double[3]   direction from observer to star (unit vector)
28542      *     @param e       double[3]   direction from Sun to observer (unit vector)
28543      *     @param em      double      distance from Sun to observer (au)
28544      *
28545      *<!-- Returned:-->
28546      *     @return p1      double[3]    <b>Returned</b> observer to deflected start (unit vector)
28547      *
28548      *<p>Notes:
28549      * <ol>
28550      *
28551      *  <li> The source is presumed to be sufficiently distant that its
28552      *     directions seen from the Sun and the observer are essentially
28553      *     the same.
28554      *
28555      *  <li> The deflection is restrained when the angle between the star and
28556      *     the center of the Sun is less than a threshold value, falling to
28557      *     zero deflection for zero separation.  The chosen threshold value
28558      *     is within the solar limb for all solar-system applications, and
28559      *     is about 5 arcminutes for the case of a terrestrial observer.
28560      *
28561      *  <li> The arguments p and p1 can be the same array.
28562      *
28563      * </ol>
28564      *  Called:
28565      * <ul>
28566      *     <li>{@link #jauLd} light deflection by a solar-system body
28567      *
28568      * </ul>
28569      *@version  2016 July 29
28570      *
28571      *@since JSOFA release 20131202
28572      *
28573      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
28574      */
28575     public static double[] jauLdsun(double p[], double e[], double em)
28576     {
28577         double em2, dlim;
28578 
28579 
28580         /* Deflection limiter (smaller for distant observers). */
28581         em2 = em*em;
28582         if ( em2 < 1.0 ) em2 = 1.0;
28583         dlim = 1e-6 / (em2 > 1.0 ? em2 : 1.0);
28584         
28585         /* Apply the deflection. */
28586         return jauLd(1.0, p, p, e, em, dlim);
28587 
28588     }
28589 
28590     /**
28591      *  Proper motion and parallax.
28592      *
28593      *<p>This function is derived from the International Astronomical Union's
28594      *  SOFA (Standards of Fundamental Astronomy) software collection.
28595      *
28596      *<p>Status:  support function.
28597      *
28598      *<!-- Given: -->
28599      *     @param rc double      ICRS RA,Dec at catalog epoch (radians)
28600      *     @param dc double      ICRS RA,Dec at catalog epoch (radians) 
28601      *     @param pr      double      RA proper motion (radians/year; Note 1)
28602      *     @param pd      double      Dec proper motion (radians/year)
28603      *     @param px      double      parallax (arcsec)
28604      *     @param rv      double      radial velocity (km/s, +ve if receding)
28605      *     @param pmt     double      proper motion time interval (SSB, Julian years)
28606      *     @param pob     double[3]   SSB to observer vector (au)
28607      *
28608      *<!-- Returned:-->
28609      *     @return pco     double[3]    <b>Returned</b> coordinate direction (BCRS unit vector)
28610      *
28611      *<p>Notes:
28612      * <ol>
28613      *
28614      *  <li> The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt.
28615      *
28616      *  <li> The proper motion time interval is for when the starlight
28617      *     reaches the solar system barycenter.
28618      *
28619      *  <li> To avoid the need for iteration, the Roemer effect (i.e. the
28620      *     small annual modulation of the proper motion coming from the
28621      *     changing light time) is applied approximately, using the
28622      *     direction of the star at the catalog epoch.
28623      *
28624      * </ol>
28625      *<p>References:
28626      * <ul>
28627      *
28628      * <li> 1984 Astronomical Almanac, pp B39-B41.
28629      *
28630      * <li> Urban, S. &amp; Seidelmann, P. K. (eds), Explanatory Supplement to
28631      *     the Astronomical Almanac, 3rd ed., University Science Books
28632      *     (2013), Section 7.2.
28633      *
28634      * </ul>
28635      *  Called:
28636      * <ul>
28637      *     <li>{@link #jauPdp} scalar product of two p-vectors
28638      *     <li>{@link #jauPn} decompose p-vector into modulus and direction
28639      *
28640      * </ul>
28641      *@version  2013 October 9
28642      *
28643      *@since JSOFA release 20131202
28644      *
28645      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
28646      */
28647     public static double[] jauPmpx(double rc, double dc, double pr, double pd,
28648             double px, double rv, double pmt, double pob[]
28649             )
28650     {
28651         /* Km/s to au/year */
28652         final double VF = DAYSEC*DJM/DAU;
28653 
28654         /* Light time for 1 au, Julian years */
28655         final double AULTY = AULT/DAYSEC/DJY;
28656 
28657         int i;
28658         double sr, cr, sd, cd, x, y, z, p[] = new double[3], dt, pxr, w, pdz, pm[] = new double[3];
28659 
28660 
28661         /* Spherical coordinates to unit vector (and useful functions). */
28662         sr = sin(rc);
28663         cr = cos(rc);
28664         sd = sin(dc);
28665         cd = cos(dc);
28666         p[0] = x = cr*cd;
28667         p[1] = y = sr*cd;
28668         p[2] = z = sd;
28669 
28670         /* Proper motion time interval (y) including Roemer effect. */
28671         dt = pmt + jauPdp(p,pob)*AULTY;
28672 
28673         /* Space motion (radians per year). */
28674         pxr = px * DAS2R;
28675         w = VF * rv * pxr;
28676         pdz = pd * z;
28677         pm[0] = - pr*y - pdz*cr + w*x;
28678         pm[1] =   pr*x - pdz*sr + w*y;
28679         pm[2] =   pd*cd + w*z;
28680 
28681         /* Coordinate direction of star (unit vector, BCRS). */
28682         for (i = 0; i < 3; i++) {
28683             p[i] += dt*pm[i] - pxr*pob[i];
28684         }
28685         NormalizedVector pco = jauPn(p);
28686 
28687         return pco.u;
28688         /* Finished. */
28689 
28690 
28691     }
28692 
28693     /**
28694      *  Star proper motion:  update star catalog data for space motion, with
28695      *  special handling to handle the zero parallax case.
28696      *
28697      *<p>This function is derived from the International Astronomical Union's
28698      *  SOFA (Standards of Fundamental Astronomy) software collection.
28699      *
28700      *<p>Status:  support function.
28701      *
28702      *<!-- Given: -->
28703      *     @param ra1     double       right ascension (radians), before
28704      *     @param dec1    double       declination (radians), before
28705      *     @param pmr1    double       RA proper motion (radians/year), before
28706      *     @param pmd1    double       Dec proper motion (radians/year), before
28707      *     @param px1     double       parallax (arcseconds), before
28708      *     @param rv1     double       radial velocity (km/s, +ve = receding), before
28709      *     @param ep1a    double       "before" epoch, part A (Note 1)
28710      *     @param ep1b    double       "before" epoch, part B (Note 1)
28711      *     @param ep2a    double       "after" epoch, part A (Note 1)
28712      *     @param ep2b    double       "after" epoch, part B (Note 1)
28713      *
28714      *<!-- Returned:-->
28715      *     @return ra2     double        <b>Returned</b> right ascension (radians), after
28716      *             dec2    double        <b>Returned</b> declination (radians), after
28717      *             pmr2    double        <b>Returned</b> RA proper motion (radians/year), after
28718      *             pmd2    double        <b>Returned</b> Dec proper motion (radians/year), after
28719      *             px2     double        <b>Returned</b> parallax (arcseconds), after
28720      *             rv2     double        <b>Returned</b> radial velocity (km/s, +ve = receding), after
28721      *
28722      *  @throws JSOFAInternalError
28723      *            int         status:
28724      *                         -1  =   <b>Returned</b> system error (should not occur)
28725      *                          0  =   <b>Returned</b> no warnings or errors
28726      *                          1  =   <b>Returned</b> distance overridden (Note 6)
28727      *                          2  =   <b>Returned</b> excessive velocity (Note 7)
28728      *                          4  =   <b>Returned</b> solution didn't converge (Note 8)
28729      *                        else  =   <b>Returned</b> binary logical OR of the above warnings
28730      *
28731      *<p>Notes:
28732      * <ol>
28733      *
28734      *  <li> The starting and ending TDB epochs ep1a+ep1b and ep2a+ep2b are
28735      *     Julian Dates, apportioned in any convenient way between the two
28736      *     parts (A and B).  For example, JD(TDB)=2450123.7 could be
28737      *     expressed in any of these ways, among others:
28738      *
28739      *            <p>epNa            epNb
28740      *
28741      *         2450123.7           0.0       (JD method)
28742      *         2451545.0       -1421.3       (J2000 method)
28743      *         2400000.5       50123.2       (MJD method)
28744      *         2450123.5           0.2       (date &amp; time method)
28745      *
28746      *     <p>The JD method is the most natural and convenient to use in cases
28747      *     where the loss of several decimal digits of resolution is
28748      *     acceptable.  The J2000 method is best matched to the way the
28749      *     argument is handled internally and will deliver the optimum
28750      *     resolution.  The MJD method and the date &amp; time methods are both
28751      *     good compromises between resolution and convenience.
28752      *
28753      *  <li> In accordance with normal star-catalog conventions, the object's
28754      *     right ascension and declination are freed from the effects of
28755      *     secular aberration.  The frame, which is aligned to the catalog
28756      *     equator and equinox, is Lorentzian and centered on the SSB.
28757      *
28758      *     <p>The proper motions are the rate of change of the right ascension
28759      *     and declination at the catalog epoch and are in radians per TDB
28760      *     Julian year.
28761      *
28762      *     <p>The parallax and radial velocity are in the same frame.
28763      *
28764      *  <li> Care is needed with units.  The star coordinates are in radians
28765      *     and the proper motions in radians per Julian year, but the
28766      *     parallax is in arcseconds.
28767      *
28768      *  <li> The RA proper motion is in terms of coordinate angle, not true
28769      *     angle.  If the catalog uses arcseconds for both RA and Dec proper
28770      *     motions, the RA proper motion will need to be divided by cos(Dec)
28771      *     before use.
28772      *
28773      *  <li> Straight-line motion at constant speed, in the inertial frame, is
28774      *     assumed.
28775      *
28776      *  <li> An extremely small (or zero or negative) parallax is overridden
28777      *     to ensure that the object is at a finite but very large distance,
28778      *     but not so large that the proper motion is equivalent to a large
28779      *     but safe speed (about 0.1c using the chosen constant).  A warning
28780      *     status of 1 is added to the status if this action has been taken.
28781      *
28782      *  <li> If the space velocity is a significant fraction of c (see the
28783      *     constant VMAX in the function iauStarpv), it is arbitrarily set
28784      *     to zero.  When this action occurs, 2 is added to the status.
28785      *
28786      *  <li> The relativistic adjustment carried out in the iauStarpv function
28787      *     involves an iterative calculation.  If the process fails to
28788      *     converge within a set number of iterations, 4 is added to the
28789      *     status.
28790      *
28791      * </ol>
28792      *  Called:
28793      * <ul>
28794      *     <li>{@link #jauSeps} angle between two points
28795      *     <li>{@link #jauStarpm} update star catalog data for space motion
28796      *
28797      * </ul>
28798      *@version  2013 October 9
28799      *
28800      *@since JSOFA release 20131202
28801      *
28802      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
28803      * @throws JSOFAInternalError 
28804      */
28805     public static CatalogCoords jauPmsafe(double ra1, double dec1, double pmr1, double pmd1,
28806             double px1, double rv1,
28807             double ep1a, double ep1b, double ep2a, double ep2b) throws JSOFAInternalError
28808     {
28809 
28810         /* Minimum allowed parallax (arcsec) */
28811         final double PXMIN = 5e-7;
28812 
28813         /* Factor giving maximum allowed transverse speed of about 1% c */
28814         final double F = 326.0;
28815 
28816         double pm, px1a;
28817 
28818 
28819         /* Proper motion in one year (radians). */
28820         pm = jauSeps(ra1, dec1, ra1+pmr1, dec1+pmd1);
28821 
28822         
28823         px1a = px1;
28824         pm *= F;
28825         if (px1a < pm) {px1a = pm;}
28826         if (px1a < PXMIN) {px1a = PXMIN;}
28827 
28828         /* Carry out the transformation using the modified parallax. */
28829         return jauStarpm(ra1, dec1, pmr1, pmd1, px1a, rv1,
28830                 ep1a, ep1b, ep2a, ep2b);
28831 
28832          /* Finished. */
28833 
28834 
28835     }
28836 
28837     /**
28838      *  Position and velocity of a terrestrial observing station.
28839      *
28840      *<p>This function is derived from the International Astronomical Union's
28841      *  SOFA (Standards of Fundamental Astronomy) software collection.
28842      *
28843      *<p>Status:  support function.
28844      *
28845      *<!-- Given: -->
28846      *     @param elong    double        longitude (radians, east +ve, Note 1)
28847      *     @param phi      double        latitude (geodetic, radians, Note 1)
28848      *     @param hm       double        height above ref. ellipsoid (geodetic, m)
28849      *     @param xp double        coordinates of the pole (radians, Note 2)
28850      *     @param yp double        coordinates of the pole (radians, Note 2) 
28851      *     @param sp       double        the TIO locator s' (radians, Note 2)
28852      *     @param theta    double        Earth rotation angle (radians, Note 3)
28853      *
28854      *<!-- Returned:-->
28855      *     @return pv       double[2][3]   <b>Returned</b> position/velocity vector (m, m/s, CIRS)
28856      *
28857      *<p>Notes:
28858      * <ol>
28859      *
28860      *  <li> The terrestrial coordinates are with respect to the WGS84
28861      *     reference ellipsoid.
28862      *
28863      *  <li> xp and yp are the coordinates (in radians) of the Celestial
28864      *     Intermediate Pole with respect to the International Terrestrial
28865      *     Reference System (see IERS Conventions), measured along the
28866      *     meridians 0 and 90 deg west respectively.  sp is the TIO locator
28867      *     s', in radians, which positions the Terrestrial Intermediate
28868      *     Origin on the equator.  For many applications, xp, yp and
28869      *     (especially) sp can be set to zero.
28870      *
28871      *  <li> If theta is Greenwich apparent sidereal time instead of Earth
28872      *     rotation angle, the result is with respect to the true equator
28873      *     and equinox of date, i.e. with the x-axis at the equinox rather
28874      *     than the celestial intermediate origin.
28875      *
28876      *  <li> The velocity units are meters per UT1 second, not per SI second.
28877      *     This is unlikely to have any practical consequences in the modern
28878      *     era.
28879      *
28880      *  <li> No validation is performed on the arguments.  Error cases that
28881      *     could lead to arithmetic exceptions are trapped by the iauGd2gc
28882      *     function, and the result set to zeros.
28883      *
28884      * </ol>
28885      *<p>References:
28886      * <ul>
28887      *
28888      * <li> McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
28889      *     IERS Technical Note No. 32, BKG (2004)
28890      *
28891      * <li> Urban, S. &amp; Seidelmann, P. K. (eds), Explanatory Supplement to
28892      *     the Astronomical Almanac, 3rd ed., University Science Books
28893      *     (2013), Section 7.4.3.3.
28894      *
28895      * </ul>
28896      *  Called:
28897      * <ul>
28898      *     <li>{@link #jauGd2gc} geodetic to geocentric transformation
28899      *     <li>{@link #jauPom00} polar motion matrix
28900      *     <li>{@link #jauTrxp} product of transpose of r-matrix and p-vector
28901      *
28902      * </ul>
28903      *@version  2013 October 9
28904      *
28905      * @since JSOFA release 20131202
28906      *
28907      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
28908      * @throws JSOFAInternalError 
28909      * @throws JSOFAIllegalParameter 
28910      */
28911     public static double [][] jauPvtob(double elong, double phi, double hm,
28912             double xp, double yp, double sp, double theta
28913             ) throws JSOFAIllegalParameter, JSOFAInternalError
28914     {
28915 
28916         double xyzm[];
28917 
28918         /* Geodetic to geocentric transformation (WGS84). */
28919         xyzm = jauGd2gc(1, elong, phi, hm);
28920 
28921         return jauPvtob(xyzm, xp, yp, sp, theta );
28922         /* Finished. */
28923 
28924 
28925     }
28926     
28927     /**
28928      * Alternative Position and velocity of a terrestrial observing station with observatory position already in cartesian.
28929      * @see JSOFA#jauPvtob(double, double, double, double, double, double, double) for more detail.
28930      * @param xyzm observatory geocentric position in metres.
28931      * @param xp double        coordinates of the pole (radians, Note 2)
28932      * @param yp double        coordinates of the pole (radians, Note 2) 
28933      * @param sp       double        the TIO locator s' (radians, Note 2)
28934      * @param theta    double        Earth rotation angle (radians, Note 3)
28935      * @return pv       double[2][3]   <b>Returned</b> position/velocity vector (m, m/s, CIRS)
28936      * @throws JSOFAIllegalParameter
28937      * @throws JSOFAInternalError
28938      */
28939     public static double [][] jauPvtob(double xyzm[],
28940             double xp, double yp, double sp, double theta
28941             ) throws JSOFAIllegalParameter, JSOFAInternalError
28942     {
28943         /* Earth rotation rate in radians per UT1 second */
28944         final double OM = 1.00273781191135448 * D2PI / DAYSEC;
28945 
28946         double rpm[][], xyz[], x, y, z, s, c;
28947         double pv[][] = new double[2][3];
28948 
28949       
28950         /* Polar motion and TIO position. */
28951         rpm = jauPom00(xp, yp, sp);
28952         xyz = jauTrxp(rpm, xyzm);
28953         x = xyz[0];
28954         y = xyz[1];
28955         z = xyz[2];
28956 
28957         /* Functions of ERA. */
28958         s = sin(theta);
28959         c = cos(theta);
28960 
28961         /* Position. */
28962         pv[0][0] = c*x - s*y;
28963         pv[0][1] = s*x + c*y;
28964         pv[0][2] = z;
28965 
28966         /* Velocity. */
28967         pv[1][0] = OM * ( -s*x - c*y );
28968         pv[1][1] = OM * (  c*x - s*y );
28969         pv[1][2] = 0.0;
28970 
28971         return pv;
28972         /* Finished. */
28973 
28974 
28975     }
28976 
28977     /**
28978      * constants A and B in the atmospheric refraction model
28979      *  dZ = A tan Z + B tan^3 Z.
28980      *  .
28981      * @author Paul Harrison (paul.harrison@manchester.ac.uk) 28 Mar 2014
28982      * @version $Revision$ $date$
28983      */
28984     public static class RefCos {
28985         /**    refraction coefficient A  */
28986         public double    a ;
28987 
28988         /**    refraction coefficient B  */
28989         public double    b ;
28990         public RefCos(double a, double b) {
28991           this.a = a;
28992           this.b = b;
28993        }
28994        
28995    }
28996 
28997     /**
28998      *  Determine the constants A and B in the atmospheric refraction model
28999      *  dZ = A tan Z + B tan^3 Z.
29000      *
29001      *  Z is the "observed" zenith distance (i.e. affected by refraction)
29002      *  and dZ is what to add to Z to give the "topocentric" (i.e. in vacuo)
29003      *  zenith distance.
29004      *
29005      *<p>This function is derived from the International Astronomical Union's
29006      *  SOFA (Standards of Fundamental Astronomy) software collection.
29007      *
29008      *<p>Status:  support function.
29009      *
29010      *<!-- Given: -->
29011      *    @param phpa    double     pressure at the observer (hPa = millibar)
29012      *    @param tc      double     ambient temperature at the observer (deg C)
29013      *    @param rh      double     relative humidity at the observer (range 0-1)
29014      *    @param wl      double     wavelength (micrometers)
29015      *
29016      *<!-- Returned:-->
29017      *    @return      <b>Returned</b> tan Z coefficient (radians)
29018      *                 <b>Returned</b> tan^3 Z coefficient (radians)
29019      *
29020      *<p>Notes:
29021      * <ol>
29022      *
29023      *  <li> The model balances speed and accuracy to give good results in
29024      *     applications where performance at low altitudes is not paramount.
29025      *     Performance is maintained across a range of conditions, and
29026      *     applies to both optical/IR and radio.
29027      *
29028      *  <li> The model omits the effects of (i) height above sea level (apart
29029      *     from the reduced pressure itself), (ii) latitude (i.e. the
29030      *     flattening of the Earth), (iii) variations in tropospheric lapse
29031      *     rate and (iv) dispersive effects in the radio.
29032      *
29033      *     <p>The model was tested using the following range of conditions:
29034      *
29035      *       <p>lapse rates 0.0055, 0.0065, 0.0075 deg/meter
29036      *       latitudes 0, 25, 50, 75 degrees
29037      *       heights 0, 2500, 5000 meters ASL
29038      *       pressures mean for height -10% to +5% in steps of 5%
29039      *       temperatures -10 deg to +20 deg with respect to 280 deg at SL
29040      *       relative humidity 0, 0.5, 1
29041      *       wavelengths 0.4, 0.6, ... 2 micron, + radio
29042      *       zenith distances 15, 45, 75 degrees
29043      *
29044      *     <p>The accuracy with respect to raytracing through a model
29045      *     atmosphere was as follows:
29046      *
29047      *                            <p>worst         RMS
29048      *
29049      *       <p>optical/IR           62 mas       8 mas
29050      *       radio               319 mas      49 mas
29051      *
29052      *     <p>For this particular set of conditions:
29053      *
29054      *       <p>lapse rate 0.0065 K/meter
29055      *       latitude 50 degrees
29056      *       sea level
29057      *       pressure 1005 mb
29058      *       temperature 280.15 K
29059      *       humidity 80%
29060      *       wavelength 5740 Angstroms
29061      *
29062      *     <p>the results were as follows:
29063      *
29064      *       <p>ZD       raytrace     iauRefco   Saastamoinen
29065      *
29066      *       10         10.27        10.27        10.27
29067      *       20         21.19        21.20        21.19
29068      *       30         33.61        33.61        33.60
29069      *       40         48.82        48.83        48.81
29070      *       45         58.16        58.18        58.16
29071      *       50         69.28        69.30        69.27
29072      *       55         82.97        82.99        82.95
29073      *       60        100.51       100.54       100.50
29074      *       65        124.23       124.26       124.20
29075      *       70        158.63       158.68       158.61
29076      *       72        177.32       177.37       177.31
29077      *       74        200.35       200.38       200.32
29078      *       76        229.45       229.43       229.42
29079      *       78        267.44       267.29       267.41
29080      *       80        319.13       318.55       319.10
29081      *
29082      *      <p>deg        arcsec       arcsec       arcsec
29083      *
29084      *     <p>The values for Saastamoinen's formula (which includes terms
29085      *     up to tan^5) are taken from Hohenkerk and Sinclair (1985).
29086      *
29087      *  <li> A wl value in the range 0-100 selects the optical/IR case and is
29088      *     wavelength in micrometers.  Any value outside this range selects
29089      *     the radio case.
29090      *
29091      *  <li> Outlandish input parameters are silently limited to
29092      *     mathematically safe values.  Zero pressure is permissible, and
29093      *     causes zeroes to be returned.
29094      *
29095      *  <li> The algorithm draws on several sources, as follows:
29096      *
29097      *     <p>a) The formula for the saturation vapour pressure of water as
29098      *        a function of temperature and temperature is taken from
29099      *        Equations (A4.5-A4.7) of Gill (1982).
29100      *
29101      *     <p>b) The formula for the water vapour pressure, given the
29102      *        saturation pressure and the relative humidity, is from
29103      *        Crane (1976), Equation (2.5.5).
29104      *
29105      *     <p>c) The refractivity of air is a function of temperature,
29106      *        total pressure, water-vapour pressure and, in the case
29107      *        of optical/IR, wavelength.  The formulae for the two cases are
29108      *        developed from Hohenkerk &amp; Sinclair (1985) and Rueger (2002).
29109      *
29110      *     <p>d) The formula for beta, the ratio of the scale height of the
29111      *        atmosphere to the geocentric distance of the observer, is
29112      *        an adaption of Equation (9) from Stone (1996).  The
29113      *        adaptations, arrived at empirically, consist of (i) a small
29114      *        adjustment to the coefficient and (ii) a humidity term for the
29115      *        radio case only.
29116      *
29117      *     <p>e) The formulae for the refraction constants as a function of
29118      *        n-1 and beta are from Green (1987), Equation (4.31).
29119      *
29120      * </ol>
29121      *<p>References:
29122      * <ul>
29123      *
29124      * <li> Crane, R.K., Meeks, M.L. (ed), "Refraction Effects in the Neutral
29125      *     Atmosphere", Methods of Experimental Physics: Astrophysics 12B,
29126      *     Academic Press, 1976.
29127      *
29128      * <li> Gill, Adrian E., "Atmosphere-Ocean Dynamics", Academic Press,
29129      *     1982.
29130      *
29131      * <li> Green, R.M., "Spherical Astronomy", Cambridge University Press,
29132      *     1987.
29133      *
29134      * <li> Hohenkerk, C.Y., &amp; Sinclair, A.T., NAO Technical Note No. 63,
29135      *     1985.
29136      *
29137      * <li> Rueger, J.M., "Refractive Index Formulae for Electronic Distance
29138      *     Measurement with Radio and Millimetre Waves", in Unisurv Report
29139      *     S-68, School of Surveying and Spatial Information Systems,
29140      *     University of New South Wales, Sydney, Australia, 2002.
29141      *
29142      * <li> Stone, Ronald C., P.A.S.P. 108, 1051-1058, 1996.
29143      *
29144      * </ul>
29145      *@version  2013 October 9
29146      *
29147      *@since JSOFA release 20131202
29148      *
29149      *  <!-- Copyright (C) 2013 IAU SOFA Board.  See notes at end. -->
29150      */
29151     public static RefCos jauRefco(double phpa, double tc, double rh, double wl )
29152     {
29153         boolean optic;
29154         double p, t, r, w, ps, pw, tk, wlsq, gamma, beta;
29155 
29156 
29157         /* Decide whether optical/IR or radio case:  switch at 100 microns. */
29158         optic = ( wl <= 100.0 );
29159 
29160         /* Restrict parameters to safe values. */
29161         t = max ( tc, -150.0 );
29162         t = min ( t, 200.0 );
29163         p = max ( phpa, 0.0 );
29164         p = min ( p, 10000.0 );
29165         r = max ( rh, 0.0 );
29166         r = min ( r, 1.0 );
29167         w = max ( wl, 0.1 );
29168         w = min ( w, 1e6 );
29169 
29170         /* Water vapour pressure at the observer. */
29171         if ( p > 0.0 ) {
29172             ps = pow ( 10.0, ( 0.7859 + 0.03477*t ) /
29173                     ( 1.0 + 0.00412*t ) ) *
29174                     ( 1.0 + p * ( 4.5e-6 + 6e-10*t*t )  );
29175             pw = r * ps / ( 1.0 - (1.0-r)*ps/p );
29176         } else {
29177             pw = 0.0;
29178         }
29179 
29180         /* Refractive index minus 1 at the observer. */
29181         tk = t + 273.15;
29182         if ( optic ) {
29183             wlsq = w * w;
29184             gamma = ( ( 77.53484e-6 +
29185                     ( 4.39108e-7 + 3.666e-9/wlsq ) / wlsq ) * p
29186                     - 11.2684e-6*pw ) / tk;
29187         } else {
29188             gamma = ( 77.6890e-6*p - ( 6.3938e-6 - 0.375463/tk ) * pw ) / tk;
29189         }
29190 
29191         /* Formula for beta from Stone, with empirical adjustments. */
29192         beta = 4.4474e-6 * tk;
29193         if ( ! optic ) beta -= 0.0074 * pw * beta;
29194 
29195         /* Refraction constants from Green. */
29196         return new RefCos( gamma * ( 1.0 - beta ),
29197                - gamma * ( beta - gamma / 2.0 ));
29198 
29199         /* Finished. */
29200 
29201 
29202     }
29203  
29204     
29205     /**
29206     *  Transformation from Galactic Coordinates to ICRS.
29207     *
29208     *  This function is derived from the International Astronomical Union's
29209     *  SOFA (Standards of Fundamental Astronomy) software collection.
29210     *
29211     *  <p>Status:  support routine.
29212     *
29213     *  @param   dl     double      galactic longitude (radians)
29214     *  @param   db     double      galactic latitude (radians)
29215     *
29216     *  @return co ICRS right ascension, declination.
29217     *
29218     *  <p>Notes:<ol>
29219     *
29220     *  <li> The IAU 1958 system of Galactic coordinates was defined with
29221     *     respect to the now obsolete reference system FK4 B1950.0.  When
29222     *     interpreting the system in a modern context, several factors have
29223     *     to be taken into account:<ul>
29224     *
29225     *     <li> The inclusion in FK4 positions of the E-terms of aberration.
29226     *
29227     *     <li> The distortion of the FK4 proper motion system by differential
29228     *       Galactic rotation.
29229     *
29230     *     <li> The use of the B1950.0 equinox rather than the now-standard
29231     *       J2000.0.
29232     *
29233     *     <li> The frame bias between ICRS and the J2000.0 mean place system.
29234     *  </ul>
29235     *     The Hipparcos Catalogue (Perryman &amp; ESA 1997) provides a rotation
29236     *     matrix that transforms directly between ICRS and Galactic
29237     *     coordinates with the above factors taken into account.  The
29238     *     matrix is derived from three angles, namely the ICRS coordinates
29239     *     of the Galactic pole and the longitude of the ascending node of
29240     *     the galactic equator on the ICRS equator.  They are given in
29241     *     degrees to five decimal places and for canonical purposes are
29242     *     regarded as exact.  In the Hipparcos Catalogue the matrix
29243     *     elements are given to 10 decimal places (about 20 microarcsec).
29244     *     In the present SOFA function the matrix elements have been
29245     *     recomputed from the canonical three angles and are given to 30
29246     *     decimal places.
29247     *
29248     *  <li> The inverse transformation is performed by the function jauIcrs2g.
29249     *  </ol>
29250     *
29251     *  Reference:
29252     *     Perryman M.A.C. &amp; ESA, 1997, ESA SP-1200, The Hipparcos and Tycho
29253     *     catalogues.  Astrometric and photometric star catalogues
29254     *     derived from the ESA Hipparcos Space Astrometry Mission.  ESA
29255     *     Publications Division, Noordwijk, Netherlands.
29256     *
29257     *  @version  2015 March 02
29258     * 
29259     *
29260     *  @since JSOFA release 20150209
29261     *
29262     */
29263     public static SphericalCoordinate jauG2icrs ( double dl, double db)
29264     {
29265        double v1[], v2[];
29266 
29267     /*
29268     *  L2,B2 system of galactic coordinates in the form presented in the
29269     *  Hipparcos Catalogue.  In degrees:
29270     *
29271     *  P = 192.85948    right ascension of the Galactic north pole in ICRS
29272     *  Q =  27.12825    declination of the Galactic north pole in ICRS
29273     *  R =  32.93192    longitude of the ascending node of the Galactic
29274     *                   plane on the ICRS equator
29275     *
29276     *  ICRS to galactic rotation matrix, obtained by computing
29277     *  R_3(-R) R_1(pi/2-Q) R_3(pi/2+P) to the full precision shown:
29278     */
29279        double r[][]  = new double[][]{ { -0.054875560416215368492398900454,
29280                             -0.873437090234885048760383168409,
29281                             -0.483835015548713226831774175116 },
29282                           { +0.494109427875583673525222371358,
29283                             -0.444829629960011178146614061616,
29284                             +0.746982244497218890527388004556 },
29285                           { -0.867666149019004701181616534570,
29286                             -0.198076373431201528180486091412,
29287                             +0.455983776175066922272100478348 } };
29288 
29289 
29290     /* Spherical to Cartesian. */
29291        v1 = jauS2c(dl, db);
29292 
29293     /* Galactic to ICRS. */
29294        v2 = jauTrxp(r, v1);
29295 
29296     /* Cartesian to spherical. */
29297        SphericalCoordinate co = jauC2s(v2);
29298 
29299     /* Express in conventional ranges. */
29300        co.alpha = jauAnp(co.alpha);
29301        co.delta = jauAnpm(co.delta);
29302 
29303     /* Finished. */
29304       return co;
29305     }
29306  
29307     
29308     
29309     /**
29310     *  Transformation from ICRS to Galactic Coordinates.
29311     *
29312     *  This function is derived from the International Astronomical Union's
29313     *  SOFA (Standards of Fundamental Astronomy) software collection.
29314     *
29315     *  <p>Status:  support routine.
29316     *
29317     *     @param dr     double      ICRS right ascension (radians)
29318     *     @param dd     double      ICRS declination (radians)
29319     *
29320     *  @return co galactic longitude (radians), galactic latitude (radians)
29321     *
29322     *  <p>Notes:<ol>
29323     *
29324     *  <li> The IAU 1958 system of Galactic coordinates was defined with
29325     *     respect to the now obsolete reference system FK4 B1950.0.  When
29326     *     interpreting the system in a modern context, several factors have
29327     *     to be taken into account:<ul>
29328     *
29329     *     <li> The inclusion in FK4 positions of the E-terms of aberration.
29330     *
29331     *     <li> The distortion of the FK4 proper motion system by differential
29332     *       Galactic rotation.
29333     *
29334     *     <li> The use of the B1950.0 equinox rather than the now-standard
29335     *       J2000.0.
29336     *
29337     *     <li> The frame bias between ICRS and the J2000.0 mean place system.
29338     *     </ul>
29339     *     The Hipparcos Catalogue (Perryman &amp; ESA 1997) provides a rotation
29340     *     matrix that transforms directly between ICRS and Galactic
29341     *     coordinates with the above factors taken into account.  The
29342     *     matrix is derived from three angles, namely the ICRS coordinates
29343     *     of the Galactic pole and the longitude of the ascending node of
29344     *     the galactic equator on the ICRS equator.  They are given in
29345     *     degrees to five decimal places and for canonical purposes are
29346     *     regarded as exact.  In the Hipparcos Catalogue the matrix
29347     *     elements are given to 10 decimal places (about 20 microarcsec).
29348     *     In the present SOFA function the matrix elements have been
29349     *     recomputed from the canonical three angles and are given to 30
29350     *     decimal places.
29351     *
29352     *  <li> The inverse transformation is performed by the function iauG2icrs.
29353     *  </ol>
29354     *  Reference:
29355     *     Perryman M.A.C. &amp; ESA, 1997, ESA SP-1200, The Hipparcos and Tycho
29356     *     catalogues.  Astrometric and photometric star catalogues
29357     *     derived from the ESA Hipparcos Space Astrometry Mission.  ESA
29358     *     Publications Division, Noordwijk, Netherlands.
29359     *
29360     *  @version   2015 January 20
29361     *
29362     *  @since JSOFA release 20150209
29363     *
29364     */
29365     public static SphericalCoordinate jauIcrs2g ( double dr, double dd )
29366     {
29367        double v1[], v2[];
29368 
29369     /*
29370     *  L2,B2 system of galactic coordinates in the form presented in the
29371     *  Hipparcos Catalogue.  In degrees:
29372     *
29373     *  P = 192.85948    right ascension of the Galactic north pole in ICRS
29374     *  Q =  27.12825    declination of the Galactic north pole in ICRS
29375     *  R =  32.93192    longitude of the ascending node of the Galactic
29376     *                   plane on the ICRS equator
29377     *
29378     *  ICRS to galactic rotation matrix, obtained by computing
29379     *  R_3(-R) R_1(pi/2-Q) R_3(pi/2+P) to the full precision shown:
29380     */
29381        double r[][] = new double[][] { { -0.054875560416215368492398900454,
29382                             -0.873437090234885048760383168409,
29383                             -0.483835015548713226831774175116 },
29384                           { +0.494109427875583673525222371358,
29385                             -0.444829629960011178146614061616,
29386                             +0.746982244497218890527388004556 },
29387                           { -0.867666149019004701181616534570,
29388                             -0.198076373431201528180486091412,
29389                             +0.455983776175066922272100478348 } };
29390 
29391 
29392     /* Spherical to Cartesian. */
29393        v1 = jauS2c(dr, dd);
29394 
29395     /* ICRS to Galactic. */
29396        v2 = jauRxp(r, v1);
29397 
29398     /* Cartesian to spherical. */
29399        SphericalCoordinate co = jauC2s(v2);
29400 
29401     /* Express in conventional ranges. */
29402        co.alpha = jauAnp(co.alpha);
29403        co.delta = jauAnpm(co.delta);
29404        return co;
29405     }
29406 
29407 // 2016-05-03 additions below    
29408     
29409     /**
29410     *
29411     *  Transformation from ecliptic coordinates (mean equinox and ecliptic
29412     *  of date) to ICRS RA,Dec, using the IAU 2006 precession model.
29413     *
29414     * <p>This function is derived from the International Astronomical Union's
29415     *  SOFA (Standards of Fundamental Astronomy) software collection.
29416     *
29417     *  <p>Status:  support function.
29418     *
29419     *  <!-- Given: -->
29420     *     @param date1 double TT as a 2-part Julian date (Note 1)
29421     *     @param date2 double TT as a 2-part Julian date (Note 1) 
29422     *     @param dl double ecliptic longitude and latitude (radians)
29423     *     @param db double ecliptic longitude and latitude (radians) 
29424     *
29425     * <!-- Returned: -->
29426     *     @return      double ICRS right ascension and declination (radians)
29427     *
29428     *<ol>
29429     *  <li> The TT date date1+date2 is a Julian Date, apportioned in any
29430     *     convenient way between the two arguments.  For example,
29431     *     JD(TT)=2450123.7 could be expressed in any of these ways,
29432     *     among others:
29433     *
29434     *            date1          date2
29435     *
29436     *         2450123.7           0.0       (JD method)
29437     *         2451545.0       -1421.3       (J2000 method)
29438     *         2400000.5       50123.2       (MJD method)
29439     *         2450123.5           0.2       (date &amp; time method)
29440     *
29441     *     The JD method is the most natural and convenient to use in
29442     *     cases where the loss of several decimal digits of resolution
29443     *     is acceptable.  The J2000 method is best matched to the way
29444     *     the argument is handled internally and will deliver the
29445     *     optimum resolution.  The MJD method and the date &amp; time methods
29446     *     are both good compromises between resolution and convenience.
29447     *
29448     *  <li> No assumptions are made about whether the coordinates represent
29449     *     starlight and embody astrometric effects such as parallax or
29450     *     aberration.
29451     *
29452     *  <li> The transformation is approximately that from ecliptic longitude
29453     *     and latitude (mean equinox and ecliptic of date) to mean J2000.0
29454     *     right ascension and declination, with only frame bias (always
29455     *     less than 25 mas) to disturb this classical picture.
29456     *</ol>
29457     *  Called: <ul>
29458     *     <li>{@link #jauS2c}       spherical coordinates to unit vector
29459     *     <li>{@link #jauEcm06}     J2000.0 to ecliptic rotation matrix, IAU 2006
29460     *     <li>{@link #jauTrxp}      product of transpose of r-matrix and p-vector
29461     *     <li>{@link #jauC2s}       unit vector to spherical coordinates
29462     *     <li>{@link #jauAnp}       normalize angle into range 0 to 2pi
29463     *     <li>{@link #jauAnpm}      normalize angle into range +/- pi
29464     *</ul>
29465     *
29466     *   @version  2016 February 9
29467     *
29468     *  @since JSOFA release 20160503
29469     *
29470     *  <!--Copyright (C) 2016 IAU SOFA Board.  See notes at end. -->
29471     */
29472     public static SphericalCoordinate jauEceq06(double date1, double date2, double dl, double db)
29473     {
29474 
29475 
29476     /* Spherical to Cartesian. */
29477        double v1[] = jauS2c(dl, db);
29478 
29479     /* Rotation matrix, ICRS equatorial to ecliptic. */
29480        double rm[][] = jauEcm06(date1, date2);
29481 
29482     /* The transformation from ecliptic to ICRS. */
29483        double v2[] = jauTrxp(rm, v1);
29484 
29485     /* Cartesian to spherical. */
29486        SphericalCoordinate co = jauC2s(v2);
29487 
29488     /* Express in conventional ranges. */
29489        co.alpha = jauAnp(co.alpha);
29490        co.delta = jauAnpm(co.delta);
29491 
29492        return co;
29493     }
29494 
29495     /**
29496     *
29497     *  ICRS equatorial to ecliptic rotation matrix, IAU 2006.
29498     *
29499     * <p>This function is derived from the International Astronomical Union's
29500     *  SOFA (Standards of Fundamental Astronomy) software collection.
29501     *
29502     *  <p>Status:  support function.
29503     *
29504     *  <!-- Given: -->
29505     *    @param date1 double         TT as a 2-part Julian date (Note 1)
29506     *    @param date2 double         TT as a 2-part Julian date (Note 1) 
29507     *
29508     * <!-- Returned: -->
29509     *     @return          double[3][3]   ICRS to ecliptic rotation matrix
29510     *
29511     *  <p>Notes: <ol>
29512     *
29513     *  <li> The TT date date1+date2 is a Julian Date, apportioned in any
29514     *     convenient way between the two arguments.  For example,
29515     *     JD(TT)=2450123.7 could be expressed in any of these ways,
29516     *     among others:
29517     *
29518     *            date1          date2
29519     *
29520     *         2450123.7           0.0       (JD method)
29521     *         2451545.0       -1421.3       (J2000 method)
29522     *         2400000.5       50123.2       (MJD method)
29523     *         2450123.5           0.2       (date &amp; time method)
29524     *
29525     *     The JD method is the most natural and convenient to use in
29526     *     cases where the loss of several decimal digits of resolution
29527     *     is acceptable.  The J2000 method is best matched to the way
29528     *     the argument is handled internally and will deliver the
29529     *     optimum resolution.  The MJD method and the date &amp; time methods
29530     *     are both good compromises between resolution and convenience.
29531     *
29532     *  <li> The matrix is in the sense
29533     *
29534     *        E_ep = rm x P_ICRS,
29535     *
29536     *     where P_ICRS is a vector with respect to ICRS right ascension
29537     *     and declination axes and E_ep is the same vector with respect to
29538     *     the (inertial) ecliptic and equinox of date.
29539     *
29540     *  <li> P_ICRS is a free vector, merely a direction, typically of unit
29541     *     magnitude, and not bound to any particular spatial origin, such
29542     *     as the Earth, Sun or SSB.  No assumptions are made about whether
29543     *     it represents starlight and embodies astrometric effects such as
29544     *     parallax or aberration.  The transformation is approximately that
29545     *     between mean J2000.0 right ascension and declination and ecliptic
29546     *     longitude and latitude, with only frame bias (always less than
29547     *     25 mas) to disturb this classical picture.
29548     *  </ol>
29549     *  Called: <ul>
29550     *     <li>{@link #jauObl06}     mean obliquity, IAU 2006
29551     *     <li>{@link #jauPmat06}    PB matrix, IAU 2006
29552     *     <li>{@link #jauIr}        initialize r-matrix to identity
29553     *     <li>{@link #jauRx}        rotate around X-axis
29554     *     <li>{@link #jauRxr}       product of two r-matrices
29555     *</ul>
29556     *
29557     *   @version  2015 December 11
29558     *
29559     *  @since JSOFA release 20160503
29560     *
29561     *  <!--Copyright (C) 2016 IAU SOFA Board.  See notes at end. -->
29562     */
29563     public static double[][] jauEcm06(double date1, double date2)
29564     {
29565        double ob, e[][] = new double[3][3];
29566 
29567 
29568     /* Obliquity, IAU 2006. */
29569        ob = jauObl06(date1, date2);
29570 
29571     /* Precession-bias matrix, IAU 2006. */
29572        double bp[][] = jauPmat06(date1, date2);
29573 
29574     /* Equatorial of date to ecliptic matrix. */
29575        jauIr(e);
29576        jauRx(ob, e);
29577 
29578     /* ICRS to ecliptic coordinates rotation matrix, IAU 2006. */
29579        return jauRxr(e, bp);
29580 
29581     }
29582 
29583     /**
29584     *
29585     *  Transformation from ICRS equatorial coordinates to ecliptic
29586     *  coordinates (mean equinox and ecliptic of date) using IAU 2006
29587     *  precession model.
29588     *
29589     * <p>This function is derived from the International Astronomical Union's
29590     *  SOFA (Standards of Fundamental Astronomy) software collection.
29591     *
29592     *  <p>Status:  support function.
29593     *
29594     *  <!-- Given: -->
29595     *     @param date1 double TT as a 2-part Julian date (Note 1)
29596     *     @param date2 double TT as a 2-part Julian date (Note 1) 
29597     *     @param dr double ICRS right ascension and declination (radians)
29598     *     @param dd double ICRS right ascension and declination (radians) 
29599     *
29600     * <!-- Returned: -->
29601     *     @return      double ecliptic longitude and latitude (radians)
29602     *<ol>
29603     *  <li> The TT date date1+date2 is a Julian Date, apportioned in any
29604     *     convenient way between the two arguments.  For example,
29605     *     JD(TT)=2450123.7 could be expressed in any of these ways,
29606     *     among others:
29607     *
29608     *            date1          date2
29609     *
29610     *         2450123.7           0.0       (JD method)
29611     *         2451545.0       -1421.3       (J2000 method)
29612     *         2400000.5       50123.2       (MJD method)
29613     *         2450123.5           0.2       (date &amp; time method)
29614     *
29615     *     The JD method is the most natural and convenient to use in
29616     *     cases where the loss of several decimal digits of resolution
29617     *     is acceptable.  The J2000 method is best matched to the way
29618     *     the argument is handled internally and will deliver the
29619     *     optimum resolution.  The MJD method and the date &amp; time methods
29620     *     are both good compromises between resolution and convenience.
29621     *
29622     *  <li> No assumptions are made about whether the coordinates represent
29623     *     starlight and embody astrometric effects such as parallax or
29624     *     aberration.
29625     *
29626     *  <li> The transformation is approximately that from mean J2000.0 right
29627     *     ascension and declination to ecliptic longitude and latitude
29628     *     (mean equinox and ecliptic of date), with only frame bias (always
29629     *     less than 25 mas) to disturb this classical picture.
29630     *</ol>
29631     *  Called:<ul>
29632     *     <li>{@link #jauS2c}       spherical coordinates to unit vector
29633     *     <li>{@link #jauEcm06}     J2000.0 to ecliptic rotation matrix, IAU 2006
29634     *     <li>{@link #jauRxp}       product of r-matrix and p-vector
29635     *     <li>{@link #jauC2s}       unit vector to spherical coordinates
29636     *     <li>{@link #jauAnp}       normalize angle into range 0 to 2pi
29637     *     <li>{@link #jauAnpm}      normalize angle into range +/- pi
29638     *</ul>
29639     *   @version  2016 February 9
29640     *
29641     *  @since JSOFA release 20160503
29642     *
29643     *  <!--Copyright (C) 2016 IAU SOFA Board.  See notes at end. -->
29644     */
29645     public static SphericalCoordinate jauEqec06(double date1, double date2, double dr, double dd)
29646     {
29647 
29648     /* Spherical to Cartesian. */
29649       double v1[] = jauS2c(dr, dd);
29650 
29651     /* Rotation matrix, ICRS equatorial to ecliptic. */
29652       double rm[][] = jauEcm06(date1, date2);
29653 
29654     /* The transformation from ICRS to ecliptic. */
29655        double v2[] = jauRxp(rm, v1);
29656 
29657     /* Cartesian to spherical. */
29658        SphericalCoordinate co = jauC2s(v2);
29659 
29660     /* Express in conventional ranges. */
29661        co.alpha = jauAnp(co.alpha);
29662        co.delta = jauAnpm(co.delta);
29663        return co;
29664 
29665     }
29666 
29667     /**
29668     *
29669     *  Transformation from ecliptic coordinates (mean equinox and ecliptic
29670     *  of date) to ICRS RA,Dec, using a long-term precession model.
29671     *
29672     * <p>This function is derived from the International Astronomical Union's
29673     *  SOFA (Standards of Fundamental Astronomy) software collection.
29674     *
29675     *  <p>Status:  support function.
29676     *
29677     *  <!-- Given: -->
29678     *    @param  epj     double     Julian epoch (TT)
29679     *    @param dl double     ecliptic longitude and latitude (radians)
29680     *    @param db double     ecliptic longitude and latitude (radians) 
29681     *
29682     * <!-- Returned: -->
29683     *     @return   double     ICRS right ascension and declination (radians)
29684     *<ol>
29685     *  <li> No assumptions are made about whether the coordinates represent
29686     *     starlight and embody astrometric effects such as parallax or
29687     *     aberration.
29688     *
29689     *  <li> The transformation is approximately that from ecliptic longitude
29690     *     and latitude (mean equinox and ecliptic of date) to mean J2000.0
29691     *     right ascension and declination, with only frame bias (always
29692     *     less than 25 mas) to disturb this classical picture.
29693     *
29694     *  <li> The Vondrak et al. (2011, 2012) 400 millennia precession model
29695     *     agrees with the IAU 2006 precession at J2000.0 and stays within
29696     *     100 microarcseconds during the 20th and 21st centuries.  It is
29697     *     accurate to a few arcseconds throughout the historical period,
29698     *     worsening to a few tenths of a degree at the end of the
29699     *     +/- 200,000 year time span.
29700     *</ol>
29701     *  Called:<ul>
29702     *     <li>{@link #jauS2c}       spherical coordinates to unit vector
29703     *     <li>{@link #jauLtecm}     J2000.0 to ecliptic rotation matrix, long term
29704     *     <li>{@link #jauTrxp}      product of transpose of r-matrix and p-vector
29705     *     <li>{@link #jauC2s}       unit vector to spherical coordinates
29706     *     <li>{@link #jauAnp}       normalize angle into range 0 to 2pi
29707     *     <li>{@link #jauAnpm}      normalize angle into range +/- pi
29708     *</ul>
29709     *  References: <ul>
29710     *
29711     *    <li>Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession
29712     *    expressions, valid for long time intervals, Astron.Astrophys. 534,
29713     *    A22
29714     *
29715     *    <li>Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession
29716     *    expressions, valid for long time intervals (Corrigendum),
29717     *    Astron.Astrophys. 541, C1
29718     *</ul>
29719     *   @version  2016 February 9
29720     *
29721     *  @since JSOFA release 20160503
29722     *
29723     *  <!--Copyright (C) 2016 IAU SOFA Board.  See notes at end. -->
29724     */
29725     public static SphericalCoordinate jauLteceq(double epj, double dl, double db)
29726     {
29727 
29728     /* Spherical to Cartesian. */
29729        double v1[] = jauS2c(dl, db);
29730 
29731     /* Rotation matrix, ICRS equatorial to ecliptic. */
29732        double rm[][] = jauLtecm(epj);
29733 
29734     /* The transformation from ecliptic to ICRS. */
29735        double v2[] = jauTrxp(rm, v1);
29736 
29737     /* Cartesian to spherical. */
29738        SphericalCoordinate co = jauC2s(v2);
29739 
29740     /* Express in conventional ranges. */
29741        co.alpha = jauAnp(co.alpha);
29742        co.delta = jauAnpm(co.delta);
29743        return co;
29744 
29745     }
29746 
29747     /**
29748     *
29749     *  ICRS equatorial to ecliptic rotation matrix, long-term.
29750     *
29751     * <p>This function is derived from the International Astronomical Union's
29752     *  SOFA (Standards of Fundamental Astronomy) software collection.
29753     *
29754     *  <p>Status:  support function.
29755     *
29756     *  <!-- Given: -->
29757     *     @param epj     double         Julian epoch (TT)
29758     *
29759     * <!-- Returned: -->
29760     *     @return      double[3][3]   ICRS to ecliptic rotation matrix
29761     *
29762     *  <p>Notes: <ol>
29763     *
29764     *  <li> The matrix is in the sense
29765     *
29766     *        E_ep = rm x P_ICRS,
29767     *
29768     *     where P_ICRS is a vector with respect to ICRS right ascension
29769     *     and declination axes and E_ep is the same vector with respect to
29770     *     the (inertial) ecliptic and equinox of epoch epj.
29771     *
29772     *  <li> P_ICRS is a free vector, merely a direction, typically of unit
29773     *     magnitude, and not bound to any particular spatial origin, such
29774     *     as the Earth, Sun or SSB.  No assumptions are made about whether
29775     *     it represents starlight and embodies astrometric effects such as
29776     *     parallax or aberration.  The transformation is approximately that
29777     *     between mean J2000.0 right ascension and declination and ecliptic
29778     *     longitude and latitude, with only frame bias (always less than
29779     *     25 mas) to disturb this classical picture.
29780     *
29781     *  <li> The Vondrak et al. (2011, 2012) 400 millennia precession model
29782     *     agrees with the IAU 2006 precession at J2000.0 and stays within
29783     *     100 microarcseconds during the 20th and 21st centuries.  It is
29784     *     accurate to a few arcseconds throughout the historical period,
29785     *     worsening to a few tenths of a degree at the end of the
29786     *     +/- 200,000 year time span.
29787     *</ol>
29788     *  Called:<ul>
29789     *     <li>{@link #jauLtpequ}    equator pole, long term
29790     *     <li>{@link #jauLtpecl}    ecliptic pole, long term
29791     *     <li>{@link #jauPxp}       vector product
29792     *     <li>{@link #jauPn}        normalize vector
29793     *</ul>
29794     *  References:<ul>
29795     *
29796     *    <li>Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession
29797     *    expressions, valid for long time intervals, Astron.Astrophys. 534,
29798     *    A22
29799     *
29800     *    <li>Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession
29801     *    expressions, valid for long time intervals (Corrigendum),
29802     *    Astron.Astrophys. 541, C1
29803     *</ul>
29804     *   @version  2015 December 6
29805     *
29806     *  @since JSOFA release 20160503
29807     *
29808     *  <!--Copyright (C) 2016 IAU SOFA Board.  See notes at end. -->
29809     */
29810     public static double[][] jauLtecm(double epj)
29811     {
29812        double rm[][] = new double[3][3];
29813     /* Frame bias (IERS Conventions 2010, Eqs. 5.21 and 5.33) */
29814        final double dx = -0.016617 * DAS2R,
29815                     de = -0.0068192 * DAS2R,
29816                     dr = -0.0146 * DAS2R;
29817 
29818 
29819     /* Equator pole. */
29820        double p[] = jauLtpequ(epj);
29821 
29822     /* Ecliptic pole (bottom row of equatorial to ecliptic matrix). */
29823        double z[] = jauLtpecl(epj);
29824 
29825     /* Equinox (top row of matrix). */
29826        double w[] = jauPxp(p, z);
29827        NormalizedVector nv = jauPn(w);
29828 
29829        double x[] = nv.u;
29830     /* Middle row of matrix. */
29831        double y[] = jauPxp(z, x);
29832 
29833     /* Combine with frame bias. */
29834        rm[0][0] =   x[0]    - x[1]*dr + x[2]*dx;
29835        rm[0][1] =   x[0]*dr + x[1]    + x[2]*de;
29836        rm[0][2] = - x[0]*dx - x[1]*de + x[2];
29837        rm[1][0] =   y[0]    - y[1]*dr + y[2]*dx;
29838        rm[1][1] =   y[0]*dr + y[1]    + y[2]*de;
29839        rm[1][2] = - y[0]*dx - y[1]*de + y[2];
29840        rm[2][0] =   z[0]    - z[1]*dr + z[2]*dx;
29841        rm[2][1] =   z[0]*dr + z[1]    + z[2]*de;
29842        rm[2][2] = - z[0]*dx - z[1]*de + z[2];
29843 
29844        return rm;
29845 
29846     }
29847 
29848     /**
29849     *
29850     *  Transformation from ICRS equatorial coordinates to ecliptic
29851     *  coordinates (mean equinox and ecliptic of date) using a long-term
29852     *  precession model.
29853     *
29854     * <p>This function is derived from the International Astronomical Union's
29855     *  SOFA (Standards of Fundamental Astronomy) software collection.
29856     *
29857     *  <p>Status:  support function.
29858     *
29859     *  <!-- Given: -->
29860     *     @param epj     double     Julian epoch (TT)
29861     *     @param dr,dd   double     ICRS right ascension and declination (radians)
29862     *
29863     * <!-- Returned: -->
29864     *     @return     ecliptic longitude and latitude (radians)
29865     *<ol>
29866     *  <li> No assumptions are made about whether the coordinates represent
29867     *     starlight and embody astrometric effects such as parallax or
29868     *     aberration.
29869     *
29870     *  <li> The transformation is approximately that from mean J2000.0 right
29871     *     ascension and declination to ecliptic longitude and latitude
29872     *     (mean equinox and ecliptic of date), with only frame bias (always
29873     *     less than 25 mas) to disturb this classical picture.
29874     *
29875     *  <li> The Vondrak et al. (2011, 2012) 400 millennia precession model
29876     *     agrees with the IAU 2006 precession at J2000.0 and stays within
29877     *     100 microarcseconds during the 20th and 21st centuries.  It is
29878     *     accurate to a few arcseconds throughout the historical period,
29879     *     worsening to a few tenths of a degree at the end of the
29880     *     +/- 200,000 year time span.
29881     *</ol>
29882     *  Called:<ul>
29883     *     <li>{@link #jauS2c}       spherical coordinates to unit vector
29884     *     <li>{@link #jauLtecm}     J2000.0 to ecliptic rotation matrix, long term
29885     *     <li>{@link #jauRxp}       product of r-matrix and p-vector
29886     *     <li>{@link #jauC2s}       unit vector to spherical coordinates
29887     *     <li>{@link #jauAnp}       normalize angle into range 0 to 2pi
29888     *     <li>{@link #jauAnpm}      normalize angle into range +/- pi
29889     *</ul>
29890     *  References:
29891     *
29892     *    Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession
29893     *    expressions, valid for long time intervals, Astron.Astrophys. 534,
29894     *    A22
29895     *
29896     *    Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession
29897     *    expressions, valid for long time intervals (Corrigendum),
29898     *    Astron.Astrophys. 541, C1
29899     *
29900     *   @version  2016 February 9
29901     *
29902     *  @since JSOFA release 20160503
29903     *
29904     *  <!--Copyright (C) 2016 IAU SOFA Board.  See notes at end. -->
29905     */
29906     public static SphericalCoordinate jauLteqec(double epj, double dr, double dd)
29907     {
29908 
29909     /* Spherical to Cartesian. */
29910        double v1[] = jauS2c(dr, dd);
29911 
29912     /* Rotation matrix, ICRS equatorial to ecliptic. */
29913        double rm[][] = jauLtecm(epj);
29914 
29915     /* The transformation from ICRS to ecliptic. */
29916        double v2[] = jauRxp(rm, v1);
29917 
29918     /* Cartesian to spherical. */
29919        SphericalCoordinate co = jauC2s(v2);
29920 
29921     /* Express in conventional ranges. */
29922       co.alpha = jauAnp(co.alpha);
29923       co.delta = jauAnpm(co.delta);
29924 
29925      return co;
29926     }
29927 
29928     /**
29929     *
29930     *  Long-term precession matrix.
29931     *
29932     * <p>This function is derived from the International Astronomical Union's
29933     *  SOFA (Standards of Fundamental Astronomy) software collection.
29934     *
29935     *  <p>Status:  support function.
29936     *
29937     *  <!-- Given: -->
29938     *     @param epj     double         Julian epoch (TT)
29939     *
29940     * <!-- Returned: -->
29941     *     @return      double[3][3]   precession matrix, J2000.0 to date
29942     *
29943     *  <p>Notes: <ol>
29944     *
29945     *  <li> The matrix is in the sense
29946     *
29947     *        P_date = rp x P_J2000,
29948     *
29949     *     where P_J2000 is a vector with respect to the J2000.0 mean
29950     *     equator and equinox and P_date is the same vector with respect to
29951     *     the equator and equinox of epoch epj.
29952     *
29953     *  <li> The Vondrak et al. (2011, 2012) 400 millennia precession model
29954     *     agrees with the IAU 2006 precession at J2000.0 and stays within
29955     *     100 microarcseconds during the 20th and 21st centuries.  It is
29956     *     accurate to a few arcseconds throughout the historical period,
29957     *     worsening to a few tenths of a degree at the end of the
29958     *     +/- 200,000 year time span.
29959     *</ol>
29960     *  Called:<ul>
29961     *     <li>{@link #jauLtpequ}    equator pole, long term
29962     *     <li>{@link #jauLtpecl}    ecliptic pole, long term
29963     *     <li>{@link #jauPxp}       vector product
29964     *     <li>{@link #jauPn}        normalize vector
29965     *</ul>
29966     *  References:
29967     *
29968     *    <p>Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession
29969     *    expressions, valid for long time intervals, Astron.Astrophys. 534,
29970     *    A22
29971     *
29972     *    <p>Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession
29973     *    expressions, valid for long time intervals (Corrigendum),
29974     *    Astron.Astrophys. 541, C1
29975     *
29976     *   @version  2015 December 6
29977     *
29978     *  @since JSOFA release 20160503
29979     *
29980     *  <!--Copyright (C) 2016 IAU SOFA Board.  See notes at end. -->
29981     */
29982     public static double[][] jauLtp(double epj )
29983     {
29984        double rp[][] = new double[3][3];
29985        int i;
29986        
29987 
29988 
29989     /* Equator pole (bottom row of matrix). */
29990        double peqr[] = jauLtpequ(epj);
29991 
29992     /* Ecliptic pole. */
29993        double pecl[] = jauLtpecl(epj);
29994 
29995     /* Equinox (top row of matrix). */
29996        double v[] = jauPxp(peqr, pecl);
29997        NormalizedVector nv = jauPn(v);
29998 
29999     /* Middle row of matrix. */
30000        v = jauPxp(peqr, nv.u);
30001 
30002     /* Assemble the matrix. */
30003        for ( i = 0; i < 3; i++ ) {
30004           rp[0][i] = nv.u[i];
30005           rp[1][i] = v[i];
30006           rp[2][i] = peqr[i];
30007        }
30008 
30009        return rp;
30010     }
30011 
30012 
30013     /**
30014     *
30015     *  Long-term precession matrix, including ICRS frame bias.
30016     *
30017     * <p>This function is derived from the International Astronomical Union's
30018     *  SOFA (Standards of Fundamental Astronomy) software collection.
30019     *
30020     *  <p>Status:  support function.
30021     *
30022     *  <!-- Given: -->
30023     *     @param epj     double         Julian epoch (TT)
30024     *
30025     * <!-- Returned: -->
30026     *     @return     double[3][3]   precession-bias matrix, J2000.0 to date
30027     *
30028     *  <p>Notes: <ol>
30029     *
30030     *  <li> The matrix is in the sense
30031     *
30032     *        P_date = rpb x P_ICRS,
30033     *
30034     *     where P_ICRS is a vector in the Geocentric Celestial Reference
30035     *     System, and P_date is the vector with respect to the Celestial
30036     *     Intermediate Reference System at that date but with nutation
30037     *     neglected.
30038     *
30039     *  <li> A first order frame bias formulation is used, of sub-
30040     *     microarcsecond accuracy compared with a full 3D rotation.
30041     *
30042     *  <li> The Vondrak et al. (2011, 2012) 400 millennia precession model
30043     *     agrees with the IAU 2006 precession at J2000.0 and stays within
30044     *     100 microarcseconds during the 20th and 21st centuries.  It is
30045     *     accurate to a few arcseconds throughout the historical period,
30046     *     worsening to a few tenths of a degree at the end of the
30047     *     +/- 200,000 year time span.
30048     *</ol>
30049     *  References:
30050     *
30051     *    Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession
30052     *    expressions, valid for long time intervals, Astron.Astrophys. 534,
30053     *    A22
30054     *
30055     *    Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession
30056     *    expressions, valid for long time intervals (Corrigendum),
30057     *    Astron.Astrophys. 541, C1
30058     *
30059     *   @version  2015 December 6
30060     *
30061     *  @since JSOFA release 20160503
30062     *
30063     *  <!--Copyright (C) 2016 IAU SOFA Board.  See notes at end. -->
30064     */
30065     public static double[][] jauLtpb(double epj)
30066     {
30067         double rpb[][] = new double[3][3];
30068     /* Frame bias (IERS Conventions 2010, Eqs. 5.21 and 5.33) */
30069        final double dx = -0.016617 * DAS2R,
30070                     de = -0.0068192 * DAS2R,
30071                     dr = -0.0146 * DAS2R;
30072 
30073        int i;
30074       
30075 
30076 
30077     /* Precession matrix. */
30078         double rp[][] = jauLtp(epj);
30079 
30080     /* Apply the bias. */
30081        for ( i = 0; i < 3; i++ ) {
30082           rpb[i][0] =  rp[i][0]    - rp[i][1]*dr + rp[i][2]*dx;
30083           rpb[i][1] =  rp[i][0]*dr + rp[i][1]    + rp[i][2]*de;
30084           rpb[i][2] = -rp[i][0]*dx - rp[i][1]*de + rp[i][2];
30085        }
30086 
30087       return rpb;
30088     }
30089 
30090     /**
30091     *
30092     *  Long-term precession of the ecliptic.
30093     *
30094     * <p>This function is derived from the International Astronomical Union's
30095     *  SOFA (Standards of Fundamental Astronomy) software collection.
30096     *
30097     *  <p>Status:  support function.
30098     *
30099     *  <!-- Given: -->
30100     *     @param epj     double         Julian epoch (TT)
30101     *
30102     * <!-- Returned: -->
30103     *     @return     double[3]      ecliptic pole unit vector
30104     *
30105     *  <p>Notes: <ol>
30106     *
30107     *  <li> The returned vector is with respect to the J2000.0 mean equator
30108     *     and equinox.
30109     *
30110     *  <li> The Vondrak et al. (2011, 2012) 400 millennia precession model
30111     *     agrees with the IAU 2006 precession at J2000.0 and stays within
30112     *     100 microarcseconds during the 20th and 21st centuries.  It is
30113     *     accurate to a few arcseconds throughout the historical period,
30114     *     worsening to a few tenths of a degree at the end of the
30115     *     +/- 200,000 year time span.
30116     *</ol>
30117     *  References:
30118     *
30119     *    Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession
30120     *    expressions, valid for long time intervals, Astron.Astrophys. 534,
30121     *    A22
30122     *
30123     *    Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession
30124     *    expressions, valid for long time intervals (Corrigendum),
30125     *    Astron.Astrophys. 541, C1
30126     *
30127     *   @version  2016 February 9
30128     *
30129     *  @since JSOFA release 20160503
30130     *
30131     *  <!--Copyright (C) 2016 IAU SOFA Board.  See notes at end. -->
30132     */
30133     public static double[] jauLtpecl(double epj)
30134     {
30135         
30136        double vec[] = new double[3];
30137     /* Obliquity at J2000.0 (radians). */
30138        final double eps0 = 84381.406 * DAS2R;
30139 
30140     /* Polynomial coefficients */
30141         final int NPOL = 4 ;
30142         final double pqpol[][] = {
30143           { 5851.607687,
30144               -0.1189000,
30145               -0.00028913,
30146                0.000000101},
30147           {-1600.886300,
30148                1.1689818,
30149               -0.00000020,
30150               -0.000000437}
30151        };
30152 
30153     /* Periodic coefficients */
30154        final double pqper[][] = {
30155           { 708.15,-5486.751211,-684.661560,  667.666730,-5523.863691},
30156           {2309.00,  -17.127623,2446.283880,-2354.886252, -549.747450},
30157           {1620.00, -617.517403, 399.671049, -428.152441, -310.998056},
30158           { 492.20,  413.442940,-356.652376,  376.202861,  421.535876},
30159           {1183.00,   78.614193,-186.387003,  184.778874,  -36.776172},
30160           { 622.00, -180.732815,-316.800070,  335.321713, -145.278396},
30161           { 882.00,  -87.676083, 198.296701, -185.138669,  -34.744450},
30162           { 547.00,   46.140315, 101.135679, -120.972830,   22.885731}
30163        };
30164        final int NPER = pqper.length;
30165 
30166     /* Miscellaneous */
30167        int i;
30168        double t, p, q, w, a, s, c;
30169 
30170 
30171     /* Centuries since J2000. */
30172        t  = ( epj - 2000.0 ) / 100.0;
30173 
30174     /* Initialize P_A and Q_A accumulators. */
30175        p = 0.0;
30176        q = 0.0;
30177 
30178     /* Periodic terms. */
30179        w = D2PI*t;
30180        for ( i = 0; i < NPER; i++ ) {
30181           a = w/pqper[i][0];
30182           s = sin(a);
30183           c = cos(a);
30184           p += c*pqper[i][1] + s*pqper[i][3];
30185           q += c*pqper[i][2] + s*pqper[i][4];
30186        }
30187 
30188     /* Polynomial terms. */
30189        w = 1.0;
30190        for ( i = 0; i < NPOL; i++ ) {
30191           p += pqpol[0][i]*w;
30192           q += pqpol[1][i]*w;
30193           w *= t;
30194        }
30195 
30196     /* P_A and Q_A (radians). */
30197        p *= DAS2R;
30198        q *= DAS2R;
30199 
30200     /* Form the ecliptic pole vector. */
30201        w = 1.0 - p*p - q*q;
30202        w = w < 0.0 ? 0.0 : sqrt(w);
30203        s = sin(eps0);
30204        c = cos(eps0);
30205        vec[0] = p;
30206        vec[1] = - q*c - w*s;
30207        vec[2] = - q*s + w*c;
30208 
30209        return vec;
30210 
30211     }
30212 
30213     /**
30214     *
30215     *  Long-term precession of the equator.
30216     *
30217     * <p>This function is derived from the International Astronomical Union's
30218     *  SOFA (Standards of Fundamental Astronomy) software collection.
30219     *
30220     *  <p>Status:  support function.
30221     *
30222     *  <!-- Given: -->
30223     *     @param epj     double         Julian epoch (TT)
30224     *
30225     * <!-- Returned: -->
30226     *     @return     double[3]      equator pole unit vector
30227     *
30228     *  <p>Notes: <ol>
30229     *
30230     *  <li> The returned vector is with respect to the J2000.0 mean equator
30231     *     and equinox.
30232     *
30233     *  <li> The Vondrak et al. (2011, 2012) 400 millennia precession model
30234     *     agrees with the IAU 2006 precession at J2000.0 and stays within
30235     *     100 microarcseconds during the 20th and 21st centuries.  It is
30236     *     accurate to a few arcseconds throughout the historical period,
30237     *     worsening to a few tenths of a degree at the end of the
30238     *     +/- 200,000 year time span.
30239     *</ol>
30240     *  References:
30241     *
30242     *    Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession
30243     *    expressions, valid for long time intervals, Astron.Astrophys. 534,
30244     *    A22
30245     *
30246     *    Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession
30247     *    expressions, valid for long time intervals (Corrigendum),
30248     *    Astron.Astrophys. 541, C1
30249     *
30250     *   @version  2016 February 9
30251     *
30252     *  @since JSOFA release 20160503
30253     *
30254     *  <!--Copyright (C) 2016 IAU SOFA Board.  See notes at end. -->
30255     */
30256     public static double[] jauLtpequ(double epj)
30257     {
30258         double veq[] = new double[3];
30259     /* Polynomial coefficients */
30260        final int NPOL = 4;
30261        final double xypol[][] = {
30262           {  5453.282155,
30263                 0.4252841,
30264                -0.00037173,
30265                -0.000000152},
30266           {-73750.930350,
30267                -0.7675452,
30268                -0.00018725,
30269                 0.000000231}
30270        };
30271 
30272     /* Periodic coefficients */
30273         final double xyper[][] = {
30274           { 256.75, -819.940624,75004.344875,81491.287984, 1558.515853},
30275           { 708.15,-8444.676815,  624.033993,  787.163481, 7774.939698},
30276           { 274.20, 2600.009459, 1251.136893, 1251.296102,-2219.534038},
30277           { 241.45, 2755.175630,-1102.212834,-1257.950837,-2523.969396},
30278           {2309.00, -167.659835,-2660.664980,-2966.799730,  247.850422},
30279           { 492.20,  871.855056,  699.291817,  639.744522, -846.485643},
30280           { 396.10,   44.769698,  153.167220,  131.600209,-1393.124055},
30281           { 288.90, -512.313065, -950.865637, -445.040117,  368.526116},
30282           { 231.10, -819.415595,  499.754645,  584.522874,  749.045012},
30283           {1610.00, -538.071099, -145.188210,  -89.756563,  444.704518},
30284           { 620.00, -189.793622,  558.116553,  524.429630,  235.934465},
30285           { 157.87, -402.922932,  -23.923029,  -13.549067,  374.049623},
30286           { 220.30,  179.516345, -165.405086, -210.157124, -171.330180},
30287           {1200.00,   -9.814756,    9.344131,  -44.919798,  -22.899655}
30288        };
30289        final int NPER = xyper.length;
30290 
30291     /* Miscellaneous */
30292        int i;
30293        double t, x, y, w, a, s, c;
30294 
30295 
30296     /* Centuries since J2000. */
30297        t  = ( epj - 2000.0 ) / 100.0;
30298 
30299     /* Initialize X and Y accumulators. */
30300        x = 0.0;
30301        y = 0.0;
30302 
30303     /* Periodic terms. */
30304        w = D2PI * t;
30305        for ( i = 0; i < NPER; i++ ) {
30306           a = w / xyper[i][0];
30307           s = sin(a);
30308           c = cos(a);
30309           x += c*xyper[i][1] + s*xyper[i][3];
30310           y += c*xyper[i][2] + s*xyper[i][4];
30311        }
30312 
30313     /* Polynomial terms. */
30314        w = 1.0;
30315        for ( i = 0; i < NPOL; i++ ) {
30316           x += xypol[0][i]*w;
30317           y += xypol[1][i]*w;
30318           w *= t;
30319        }
30320 
30321     /* X and Y (direction cosines). */
30322        x *= DAS2R;
30323        y *= DAS2R;
30324 
30325     /* Form the equator pole vector. */
30326        veq[0] = x;
30327        veq[1] = y;
30328        w = 1.0 - x*x - y*y;
30329        veq[2] = w < 0.0 ? 0.0 : sqrt(w);
30330 
30331        
30332        return veq;
30333 
30334     }
30335    
30336 }
30337 
30338 /*
30339  * Copyright © 2016 Paul Harrison, University of Manchester.
30340  * 
30341  * This JSOFA software is derived from the official C release of the "Standards Of Fundamental Astronomy" (SOFA) library 
30342  * of the International Astronomical Union. The intention is to reproduce the functionality and algorithms of 
30343  * the official SOFA library in a pure Java form.
30344  * 
30345  * The responsibility for the maintenance and supply of the JSOFA library lies with the author (not the IAU SOFA Board), 
30346  * However, The JSOFA software is provided "as is" and the author makes no warranty as to its use or performance. 
30347  * The author does not and cannot warrant the performance or results which the user may obtain by using the JSOFA software. 
30348  * The author makes no warranties, express or implied, as to non-infringement of third party rights, merchantability,
30349  * or fitness for any particular purpose. In no event will the author be liable to the user for any consequential, 
30350  * incidental, or special damages, including any lost profits or lost savings, even if the author has been advised
30351  * of such damages, or for any claim by any third party.
30352  * 
30353  * Other conditions of the original license (reproduced below) are carried over as applicable.
30354  */
30355 
30356 /*----------------------------------------------------------------------
30357 **
30358 **  Copyright (C) 2016
30359 **  Standards Of Fundamental Astronomy Board
30360 **  of the International Astronomical Union.
30361 **
30362 **  =====================
30363 **  SOFA Software License
30364 **  =====================
30365 **
30366 **  NOTICE TO USER:
30367 **
30368 **  BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING SIX TERMS AND
30369 **  CONDITIONS WHICH APPLY TO ITS USE.
30370 **
30371 **  1. The Software is owned by the IAU SOFA Board ("SOFA").
30372 **
30373 **  2. Permission is granted to anyone to use the SOFA software for any
30374 **     purpose, including commercial applications, free of charge and
30375 **     without payment of royalties, subject to the conditions and
30376 **     restrictions listed below.
30377 **
30378 **  3. You (the user) may copy and distribute SOFA source code to others,
30379 **     and use and adapt its code and algorithms in your own software,
30380 **     on a world-wide, royalty-free basis.  That portion of your
30381 **     distribution that does not consist of intact and unchanged copies
30382 **     of SOFA source code files is a "derived work" that must comply
30383 **     with the following requirements:
30384 **
30385 **     a) Your work shall be marked or carry a statement that it
30386 **        (i) uses routines and computations derived by you from
30387 **        software provided by SOFA under license to you; and
30388 **        (ii) does not itself constitute software provided by and/or
30389 **        endorsed by SOFA.
30390 **
30391 **     b) The source code of your derived work must contain descriptions
30392 **        of how the derived work is based upon, contains and/or differs
30393 **        from the original SOFA software.
30394 **
30395 **     c) The names of all routines in your derived work shall not
30396 **        include the prefix "iau" or "sofa" or trivial modifications
30397 **        thereof such as changes of case.
30398 **
30399 **     d) The origin of the SOFA components of your derived work must
30400 **        not be misrepresented;  you must not claim that you wrote the
30401 **        original software, nor file a patent application for SOFA
30402 **        software or algorithms embedded in the SOFA software.
30403 **
30404 **     e) These requirements must be reproduced intact in any source
30405 **        distribution and shall apply to anyone to whom you have
30406 **        granted a further right to modify the source code of your
30407 **        derived work.
30408 **
30409 **     Note that, as originally distributed, the SOFA software is
30410 **     intended to be a definitive implementation of the IAU standards,
30411 **     and consequently third-party modifications are discouraged.  All
30412 **     variations, no matter how minor, must be explicitly marked as
30413 **     such, as explained above.
30414 **
30415 **  4. You shall not cause the SOFA software to be brought into
30416 **     disrepute, either by misuse, or use for inappropriate tasks, or
30417 **     by inappropriate modification.
30418 **
30419 **  5. The SOFA software is provided "as is" and SOFA makes no warranty
30420 **     as to its use or performance.   SOFA does not and cannot warrant
30421 **     the performance or results which the user may obtain by using the
30422 **     SOFA software.  SOFA makes no warranties, express or implied, as
30423 **     to non-infringement of third party rights, merchantability, or
30424 **     fitness for any particular purpose.  In no event will SOFA be
30425 **     liable to the user for any consequential, incidental, or special
30426 **     damages, including any lost profits or lost savings, even if a
30427 **     SOFA representative has been advised of such damages, or for any
30428 **     claim by any third party.
30429 **
30430 **  6. The provision of any version of the SOFA software under the terms
30431 **     and conditions specified herein does not imply that future
30432 **     versions will also be made available under the same terms and
30433 **     conditions.
30434 *
30435 **  In any published work or commercial product which uses the SOFA
30436 **  software directly, acknowledgement (see www.iausofa.org) is
30437 **  appreciated.
30438 **
30439 **  Correspondence concerning SOFA software should be addressed as
30440 **  follows:
30441 **
30442 **      By email:  sofa@ukho.gov.uk
30443 **      By post:   IAU SOFA Center
30444 **                 HM Nautical Almanac Office
30445 **                 UK Hydrographic Office
30446 **                 Admiralty Way, Taunton
30447 **                 Somerset, TA1 2DN
30448 **                 United Kingdom
30449 **
30450 **--------------------------------------------------------------------*/
30451 
30452 
30453 /*
30454  * $Log$
30455  */